(* Content-type: application/mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 6.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       145,          7]
NotebookDataLength[    175171,       4606]
NotebookOptionsPosition[    165580,       4291]
NotebookOutlinePosition[    166271,       4314]
CellTagsIndexPosition[    166228,       4311]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["TB transport", "Title",
 CellChangeTimes->{{3.447691314*^9, 3.4476913227530003`*^9}, 
   3.447706081257*^9, {3.4487898883283997`*^9, 3.4487898897167997`*^9}, {
   3.44882828692481*^9, 3.44882829347681*^9}, 3.473788270259161*^9}],

Cell["\<\
This script is not entirely automatic, there are some items that has to set \
by hand, however I've already set everything so it can be ran.\
\>", "Text",
 CellChangeTimes->{{3.447697011513*^9, 3.447697096363*^9}, {
  3.4479863299588003`*^9, 3.4479863748712*^9}}],

Cell[CellGroupData[{

Cell["Global settings", "Section",
 CellChangeTimes->{{3.447682651534*^9, 3.447682658054*^9}, {3.447682734962*^9,
   3.447682735053*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"Remove", "[", "\"\<Global`*\>\"", "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetDirectory", "[", 
   RowBox[{"NotebookDirectory", "[", "]"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"$MinPrecision", "=", "2"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"$MaxPrecision", "=", "4"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"$MaxExtraPrecision", "=", "Infinity"}], ";"}]}], "Input",
 CellChangeTimes->{{3.447682911984*^9, 3.4476829134639997`*^9}, {
   3.4766049574617615`*^9, 3.476604992560769*^9}, {3.4766050785376863`*^9, 
   3.4766050829929414`*^9}, 3.4766053165452995`*^9, {3.4766053542064543`*^9, 
   3.476605357321632*^9}, {3.476605400077078*^9, 3.4766054022772036`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"Remove", "::", "\<\"rmnsm\"\>"}], 
  RowBox[{
  ":", " "}], "\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"There are no symbols \
matching \\\\\\\\\\\\\\\"\\\\\\\"\\\", \
\\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\!\\(\\\"Global`*\\\"\\), \\\"MT\\\
\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\"\\\\\\\\\\\\\\\".\\\\\\\"\\\", \
\\\"MT\\\"]\\) \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/Remove/rmnsm\\\", ButtonNote -> \
\\\"Remove::rmnsm\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.476631273697702*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Lead", "Section",
 CellChangeTimes->{{3.44882834799881*^9, 3.44882835837281*^9}, {
  3.4488285086476097`*^9, 3.44882851304681*^9}, {3.473788277118553*^9, 
  3.473788299522835*^9}}],

Cell[CellGroupData[{

Cell["Input", "Subsection",
 CellChangeTimes->{{3.4737883916261024`*^9, 3.473788397306428*^9}}],

Cell[CellGroupData[{

Cell["Unit cell Hamiltonian and overlap\t", "Subsubsection",
 CellChangeTimes->{{3.473788434915579*^9, 3.4737884488313746`*^9}, {
  3.4737885126860266`*^9, 3.473788515276175*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"H", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"0", "1"},
      {"1", "0"}
     }], "\[NoBreak]", ")"}]}], ";", " ", 
  RowBox[{"S", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"1", "0.2"},
      {"0.2", "1"}
     }], "\[NoBreak]", ")"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.44882844570161*^9, 3.4488284525188103`*^9}, {
  3.4488285229528103`*^9, 3.44882852587001*^9}, {3.4737882844799743`*^9, 
  3.473788366644674*^9}, {3.473788417243568*^9, 3.473788417612589*^9}, {
  3.4737885177613173`*^9, 3.473788537841466*^9}, {3.4762801847968583`*^9, 
  3.4762801855869036`*^9}, {3.476280843633542*^9, 3.4762808439225583`*^9}, {
  3.4763455188828497`*^9, 3.476345520383936*^9}, {3.476348213051947*^9, 
  3.4763482160831203`*^9}}]
}, Closed]],

Cell[CellGroupData[{

Cell["Coupling Hamiltonian and overlap", "Subsubsection",
 CellChangeTimes->{{3.473788460719054*^9, 3.473788465168309*^9}, {
  3.4737885662730923`*^9, 3.4737885692552624`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"V", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"1", 
       RowBox[{"1", "/", "2"}]},
      {"0", 
       RowBox[{
        RowBox[{"1", "/", "2"}], "\[ImaginaryI]"}]}
     }], "\[NoBreak]", ")"}]}], ";", " ", 
  RowBox[{"T", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"0.1", "0"},
      {"0", "0"}
     }], "\[NoBreak]", ")"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.4737885434687877`*^9, 3.4737885932846365`*^9}, {
   3.476272092714018*^9, 3.476272095481176*^9}, {3.4762739241227684`*^9, 
   3.4762739243157797`*^9}, {3.4762739680802827`*^9, 3.476273968592312*^9}, 
   3.4763455226900673`*^9, 3.4763455715918646`*^9, {3.4763481687284117`*^9, 
   3.476348169235441*^9}, 3.476348217692213*^9}]
}, Closed]],

Cell[CellGroupData[{

Cell["their adjoints", "Subsubsection",
 CellChangeTimes->{{3.473788804246703*^9, 3.4737888146742997`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"aV", "=", 
   RowBox[{"ConjugateTranspose", "[", "V", "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"aT", "=", 
   RowBox[{"ConjugateTranspose", "[", "T", "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.4737887604371977`*^9, 3.473788788887825*^9}}]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["Band Structure", "Subsection",
 CellChangeTimes->{{3.47378848668954*^9, 3.473788489621708*^9}}],

Cell[CellGroupData[{

Cell["k - dependent Hamiltonian and overlap", "Subsubsection",
 CellChangeTimes->{{3.4737886397282934`*^9, 3.473788654205121*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"Hk", "[", "k_", "]"}], ":=", 
   RowBox[{
    RowBox[{"aV", " ", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", "\[ImaginaryI]"}], " ", "k"}], "]"}]}], " ", "+", " ", 
    "H", " ", "+", " ", 
    RowBox[{"V", " ", 
     RowBox[{"Exp", "[", 
      RowBox[{"\[ImaginaryI]", " ", "k"}], "]"}]}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"Sk", "[", "k_", "]"}], ":=", 
   RowBox[{
    RowBox[{"aT", " ", 
     RowBox[{"Exp", "[", 
      RowBox[{
       RowBox[{"-", "\[ImaginaryI]"}], " ", "k"}], "]"}]}], " ", "+", " ", 
    "S", " ", "+", " ", 
    RowBox[{"T", " ", 
     RowBox[{"Exp", "[", 
      RowBox[{"\[ImaginaryI]", " ", "k"}], "]"}]}]}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.473788633010909*^9, 3.473788706746126*^9}, {
  3.473788828180072*^9, 3.4737889020402966`*^9}}]
}, Closed]],

Cell[CellGroupData[{

Cell["eigen solution", "Subsubsection",
 CellChangeTimes->{{3.473788919333286*^9, 3.4737889255886436`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Ek", "[", "k_", "]"}], ":=", 
   RowBox[{"Eigenvalues", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"Hk", "[", "k", "]"}], ",", 
      RowBox[{"Sk", "[", "k", "]"}]}], "}"}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.4737889379283495`*^9, 3.4737890157327995`*^9}, 
   3.4737903778897104`*^9}]
}, Closed]],

Cell[CellGroupData[{

Cell["Plot", "Subsubsection",
 CellChangeTimes->{{3.4737903877712755`*^9, 3.4737903882933054`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ListPlot", "[", 
  RowBox[{
   RowBox[{"Flatten", "[", 
    RowBox[{
     RowBox[{"Table", "[", 
      RowBox[{
       RowBox[{
        RowBox[{
         RowBox[{"{", 
          RowBox[{"k", ",", "#"}], "}"}], " ", "&"}], "  ", "/@", " ", 
        RowBox[{"Re", "[", 
         RowBox[{"Ek", "[", "k", "]"}], "]"}]}], ",", 
       RowBox[{"{", 
        RowBox[{"k", ",", 
         RowBox[{"-", "\[Pi]"}], ",", "\[Pi]", " ", ",", "0.05"}], "}"}]}], 
      "]"}], ",", "1"}], "]"}], ",", 
   RowBox[{"Frame", "\[Rule]", "True"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.4737890190249877`*^9, 3.47378902360625*^9}, {
   3.4737890805055046`*^9, 3.473789196046113*^9}, {3.473789325914541*^9, 
   3.4737893793745985`*^9}, {3.4737894407711105`*^9, 
   3.4737894422251935`*^9}, {3.4737894722859125`*^9, 3.473789491607018*^9}, {
   3.4737902741287756`*^9, 3.4737903218975077`*^9}, {3.4762791292444844`*^9, 
   3.476279152282802*^9}, 3.4762793197283792`*^9, {3.4762794262354712`*^9, 
   3.4762794557701607`*^9}}],

Cell[BoxData[
 GraphicsBox[
  {Hue[0.67, 0.6, 0.6], PointBox[CompressedData["
1:eJxF1Hs41NkfwPHvjBkzXdzbDUWIrWzJ6rKi3fN1ye6WsolWSddVqZBUuimk
XGrbiFItqdyibJJLoXNIu7kW5TIYIYy7GZcxYzC/fnXOs3+c5/O8nuec53k/
nz+O/m5vR3cmRVETn87/p+YSWyeZ/jRkvY4OS+VyEbHJ7LT2Ok4+ePIPvz8q
j4vCVLZT2UIOIhayVXNT0UuwbqdfiIkzF20uifLKKOMgYrXo1WruySWgQ6qq
/3qAg5hDhcN/3eQgYkNVY8HSjDfg7LXU57tCOWjDr7e5MVs5iFgrpNqrsLca
fOnhIOS+R6NFmYOIZ5x0VdaeXov7FNH6gvMZldmKiHjtNcau56Y83KeILnNn
oDpHRUS8Bd5nCbY14T42co1UMgn5yEbEg3eP3VC5/AH3sRF/w7OEsx5sRKzS
UMgQuLXiPja6kn1MzbeDhYiH5+9XGR5pw30spLH4qq6xCwsRT/eyLDcIb8d9
LGSSnZPkV6SAiC3cB2cFze3EfQpoLeo0sTRSQMTa9BBllibAfQooPGKzj1sg
ExE3in9f6rGiG/cpIMO9RczKOgYiPhdpa3T0eQ/uY6KfxpK0AhcxELGlZl1W
1qo+3MdEeTU7/D39KESswQjxTH7Sj/sYaODhUuuvLsgh8b4QSzHPcBD3MVCN
/Uxe7OwpSNzq6ps1/pMQ9zGQ+rv+37elTEDi2Wcs/22SCnEfhVQYHkmmq2SQ
WMPKsW8qWYT7KBT0o6WysEwKicv0khJcHIdAybC+9VW+HKo7WMTs2S2BxEf/
fCjpkwyBiW+cj71UlcPggPLmNVNiSKye661SensYmG4NTRHbTEFNFvzN6u4o
JDbkpV3mWo6APX/kNS7ym4TnNsU/Kq39z3mGa1MH7EfgdTSg7JY6AeemL5lr
6T0KiOuKliq/Yw7jHhn038bzucQSA2L1M1sTtxeLcI8MmsDofUPXxYD4h0We
xT2RQtwzDk8N8DMffDMGiA8Mldod/jAAv/RI4YRneVxv5hggDq4I6uXl9OE+
CVxFKbsKf5QA4stvtrcZZfTgvjGoU+9q0fuvBBCbhC5NMK7own1jcMosrpHj
IAXEC7ak9vgrCXCfGFoq1R7f914KiMNbddf6+HbgvlHIM13lpesyDojDT1sc
U6Hacd8IbKw+uc6sYRwQu3bP8NZ+2ob7hmHgPo91MVtlgFij1Vgw/Wor7huG
xhE6Ect5MkDsEDejVzWqBfcNwaENLkoNzhOAuL75ufzbgA9w9+ceEdzCLtZc
93YCEAeFjq8KXNCM+4QwPflKhsXPk4D4gDnvX9FcPowS2ATr5Q1CWR7LakPB
JCCephyQ07S9CUrWp/Zc1B+AxSv9X81bOgWId+QvKV/d2wh3PlXd2B/SByN8
xs3p2ClA/FgqMs+GjbBY2y9n00APzB1xVrLgyAGxn1PF5QReI1wcyNd57tQN
Wfe7bl07JAfEc/QWWS9c2QSvfu4RwPjXtu5V5XJA3B/cf3ZZNenrhL5mUDVf
g6KJVThPn0Sn8nFfOzxnhMw5P1I08a35Wq3s/Gbc1wZfqEYvUHGnaOJtWwsL
oxktuK8VGn0j0rgdStHE6gr1zE0vWqDemxCu1fEPsPRyXe3RFIomDpw152RY
ZCsU3naqUbJpgu6R3WYexRRNnLP8o1/YmTaI9uvfa1DhwUd9tPynJoomnulr
25h06iMMXTHgldxUA5OcBRbtgxRN/IfB+WsWl9qhCzPP8uiDagi3tynNklM0
ca/D7Zr7DzsgHaeiFtRXCfdMeuc/nsagiYMk6Qq/8Dthy/cPUudcfA1/y424
el2FQRPXb5y/PWZOFwyosrbNmlcEe2OOFySoMmhicX33Je7ebqhXm5sXeyQH
TohfgYKZDJo4+qmBolZeD0Tq9fy76xJh7fGfC4oVGDSxw0JtH0etPkjNVRxs
/j4Q6N4Qu98bpWjioJLHPXbn+mGAnqtzhOARcPJWqQdtFE180viqU2TvAKTc
TvlFozxQtSSEG1by6T121kikg6eJEAqj5htk2BWD28kNpofSPu0f+4V17Myu
LiH8VRYWOvtRKVjmavCSF0LRxBfnhX28niCCLaYnxl6EvQU5r7Tci7dTNLFq
cWpr084hqPp7mvFQ/jvwpzBrSM+Uoom1vF7UGOgMQ/pGs5uRsBasTk9TqxiT
A+LQbyMu19UPwxOlahEu8xuAQFf3O51gOSAeGMqYdfjaCEyZtC2+tJkPHigt
5Riz5YC4SDVz2n77UXhYM//0B9sW4FF+N1h4agoQOyUHCawUxJD7xPmrk82t
4OJR1kLfjklA3DzksTckRwzj1w2mq5/4CP64+7fvc9tJQHww3qmlZP8YXN0R
+vNDtQ4wVxh7qiZmAhC3umuje19L4PuzBm1r0jpBEvfChYZWGSCuKL8vy0QS
3NcFJp2eVQnmyQAxf03nzZS9UtzXDXZbnz9ouGkcELPNeWtWcMdxXy8YXp02
qJn4n1OaEo0KT0uB+eeefhC7J95f5wcZJF62pPNv6U0JqP/cMwB2ZGtf0Xwr
g8S8tt2VX6WPAfOZzQXeBkLQHehs3+c2AYlF8b6ZB3LFgMVLDV89KATGEXZb
QjsnILHuvXD/bc9GwdtEv9+m5YuA9unakh6PSUic0q/XsCNjBPx1xNawNnQI
3Noxx1K/axISp3uPVsjih8EhoCa65zwMZnu6TPyyawoSb93y7G7Zp3tfekZA
nL/S+uiaKUh8MPeMMMBDhPtGgOgvwzS7NXJIXGAUVd1hI8R9o8Btr3xR9mM5
JF5VKP7+xXcDuE8MjhtafFw4k0LENTx9ml/di/vGwHSbFEeHHylE/HWAetkB
z27cJwFD9xJVdbwpRFxqeN6lV0GA+ySgokPLqj+OQsSP0+CKRTfbcZ8U/K0D
oxZUUog4/k55zkrTNhD/uWccHJ3cKAGTFCLOCl9xkR/zAffJgBm/4EnWYgYi
brkjbehoa8B9E0DiDgrV3BiI2G5TR7W9XS3umwDn9+Svbr/CQMRRwcczfymr
wn2TwGqn93VUxEDEVYZWDW9HSnHfFLi/+XCIuZSBiENXysOLc4twnxxYe61N
rTFjIuLrsyc60wRZ4PN3p0bR47qnWtUOMxExX/d49/KcWBB0yHlNnB9FlyYo
CjZkMBFx04MAzZc+N2BXdV4aq5miNTsU4yvETEQ85Rhtn96QAX9dZaB+0JZB
L6oyYCXRCohYuYu9su1oPsy+E3qiKpVBH1684Dy6ooCI186a+a1BeRH80sOk
Kf9nRVUtCoj4RZyju/T2P/BLD5MONqhw2LKShYg7L4jD7iSV4D4mbV++2v/+
FRYiztQe7q7oLcN9CjQ/Z6NFZRcLEa8I3NSq6VWB+xToUzXN9m9t2IhYp61E
+YZZJe5j0TFnt+gFxbER8eznfWIfuhL3segwdt365DE2IqY2t53zjK/AfSza
9cw7Lcl6RUQsKjzEPbKtHPexaWa3kbNxvCIi3rFLlKd/rhT3sWln7tgaaZ8i
Im7ovLjyrMZr3KdIO9ct9168jIOIHXw3u8UbvsJ9irTJORWzWB8OIg4acB0I
LCjEfYr0y3m62yyTOYi43DIx9lFVHu7j0A3veVD1HQcRfx3+8X3nrkzcx6Ht
TG6N2YxwEPGRss02o2cTcB+XVnOPP6w9nYuIRVT7iWcbd+A+Ls1xe1Mr1eAi
4pOy86KriffBlx4uHclwHtmvxkXEYf9oGOXceQr+B7kWHlA=
    "]]},
  AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
  Axes->True,
  Frame->True,
  PlotRange->Automatic,
  PlotRangeClipping->True]], "Output",
 CellChangeTimes->{{3.4737902932718706`*^9, 3.473790311566917*^9}, 
   3.473790383974058*^9, 3.474295314709446*^9, 3.476272492495884*^9, 
   3.476273928126998*^9, 3.476273972241521*^9, {3.4762791467334847`*^9, 
   3.4762791527458286`*^9}, 3.4762791925251036`*^9, 3.4762793210724564`*^9, {
   3.4762794283955946`*^9, 3.476279456831221*^9}, 3.4762801893161173`*^9, {
   3.4762808307518053`*^9, 3.4762808475277643`*^9}, 3.476281687984836*^9, 
   3.476344713720797*^9, 3.47634552571424*^9, 3.4763455818924537`*^9, 
   3.476347109992856*^9, 3.4763473173547163`*^9, 3.476348174787759*^9, 
   3.4763482203453646`*^9, 3.4763589354533653`*^9, 3.4764697324298587`*^9, 
   3.476480733864105*^9, 3.476485793667509*^9, 3.476485875971217*^9, 
   3.4765199130127783`*^9, 3.4766050006862335`*^9, 3.4766050867501564`*^9, {
   3.4766052714297194`*^9, 3.476605286245567*^9}, 3.476605320535528*^9, {
   3.4766053612728577`*^9, 3.476605404889353*^9}, 3.476631274577752*^9}]
}, Open  ]]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["Inverse problem", "Subsection",
 CellChangeTimes->{{3.476270793434703*^9, 3.4762708014841633`*^9}}],

Cell[CellGroupData[{

Cell["Energy dependent matricies", "Subsubsection",
 CellChangeTimes->{{3.476272848951272*^9, 3.476272857196744*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"Ve", "[", "e_", "]"}], ":=", 
   RowBox[{"V", "-", 
    RowBox[{"e", " ", "T"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"aVe", "[", "e_", "]"}], ":=", 
   RowBox[{"aV", "-", 
    RowBox[{"e", " ", "aT"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"He", "[", "e_", "]"}], ":=", 
   RowBox[{"H", "-", 
    RowBox[{"e", " ", "S"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Id", ":=", " ", 
   RowBox[{"IdentityMatrix", "[", 
    RowBox[{"Length", "[", "H", "]"}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.476272878320952*^9, 3.476272969636175*^9}, 
   3.4762795582420216`*^9}]
}, Closed]],

Cell[CellGroupData[{

Cell["double size matrix", "Subsubsection",
 CellChangeTimes->{{3.476270816316012*^9, 3.4762708305528264`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"lM", "[", "e_", "]"}], ":=", " ", 
   RowBox[{"ArrayFlatten", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{
        RowBox[{"-", 
         RowBox[{"He", "[", "e", "]"}]}], ",", 
        RowBox[{"-", 
         RowBox[{"aVe", "[", "e", "]"}]}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{"Id", ",", 
        RowBox[{"0", "Id"}]}], "}"}]}], "}"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"rM", "[", "e_", "]"}], ":=", 
   RowBox[{"ArrayFlatten", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{
        RowBox[{"Ve", "[", "e", "]"}], ",", 
        RowBox[{"0", "Id"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"0", " ", "Id"}], ",", "Id"}], "}"}]}], "}"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"lM", "[", "e", "]"}], " ", "//", " ", "MatrixForm"}], ";", 
  RowBox[{
   RowBox[{"rM", "[", "e", "]"}], " ", "//", " ", "MatrixForm"}], 
  ";"}]}], "Input",
 CellChangeTimes->{{3.4762715539372015`*^9, 3.476271855234435*^9}, {
  3.476271937604146*^9, 3.4762719603054447`*^9}, {3.4762729788817034`*^9, 
  3.4762730226762085`*^9}, {3.4762796235787587`*^9, 3.476279624181793*^9}, {
  3.476279758598481*^9, 3.4762798211730604`*^9}}]
}, Closed]],

Cell[CellGroupData[{

Cell["Solving the double size problem", "Subsubsection",
 CellChangeTimes->{{3.4762798566140876`*^9, 3.4762798629084473`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"getEigen", "[", "e_", "]"}], ":=", 
  RowBox[{"Eigensystem", "[", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"lM", "[", 
      RowBox[{"N", "[", "e", "]"}], "]"}], ",", 
     RowBox[{"rM", "[", 
      RowBox[{"N", "[", "e", "]"}], "]"}]}], "}"}], 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"getz", " ", "[", "e_", "]"}], ":=", 
   RowBox[{
    RowBox[{"getEigen", "[", "e", "]"}], "[", 
    RowBox[{"[", "1", "]"}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.476271865383015*^9, 3.476271898319899*^9}, {
  3.476271986847963*^9, 3.4762720695456924`*^9}, {3.4762721231117563`*^9, 
  3.4762721287260776`*^9}, {3.476272234728141*^9, 3.476272260811632*^9}, {
  3.476272299424841*^9, 3.4762723206320543`*^9}, {3.4762724479203343`*^9, 
  3.476272448587373*^9}, {3.4762725197384424`*^9, 3.4762726013061075`*^9}, {
  3.4762726631516447`*^9, 3.476272675106329*^9}, {3.476272743733254*^9, 
  3.4762727437902575`*^9}, {3.4762734979883947`*^9, 3.476273498150404*^9}, {
  3.4762781919878764`*^9, 3.476278195621084*^9}, {3.47627987484013*^9, 
  3.4762799072639847`*^9}, {3.4766052581799617`*^9, 3.4766052818333144`*^9}, {
  3.4766053692593145`*^9, 3.476605373039531*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell["\<\
ZM diagonal matrix contains z eigen values WM contains column eigen vectors\
\>", "Subsubsection",
 CellChangeTimes->{{3.476279920331732*^9, 3.476279963528203*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"ZM", "[", "e_", "]"}], ":=", 
  RowBox[{"DiagonalMatrix", "[", 
   RowBox[{
    RowBox[{"getEigen", "[", "e", "]"}], "[", 
    RowBox[{"[", "1", "]"}], "]"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WM", "[", "e_", "]"}], ":=", 
  RowBox[{"Transpose", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"Normalize", "[", "#", "]"}], " ", "&"}], " ", "/@", 
    RowBox[{"Transpose", "[", 
     RowBox[{
      RowBox[{"Transpose", "[", 
       RowBox[{
        RowBox[{"getEigen", "[", "e", "]"}], "[", 
        RowBox[{"[", 
         RowBox[{"Length", "[", "H", "]"}], "]"}], "]"}], "]"}], "[", 
      RowBox[{"[", 
       RowBox[{
        RowBox[{"1", ";;", 
         RowBox[{"Length", "[", "H", "]"}]}], ",", "All"}], "]"}], "]"}], 
     "]"}]}], "]"}]}]}], "Input",
 CellChangeTimes->{{3.476347030405304*^9, 3.476347082640291*^9}, {
  3.4763472959714932`*^9, 3.476347305737052*^9}}]
}, Closed]],

Cell[CellGroupData[{

Cell["\<\
back substitution the matricies into the original eigenvalue problem (it has \
to be zero)\
\>", "Subsubsection",
 CellChangeTimes->{{3.476279980368166*^9, 3.476280009379825*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ListLinePlot", "[", 
  RowBox[{
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"e", ",", 
       RowBox[{"Max", "[", 
        RowBox[{"Abs", "[", 
         RowBox[{
          RowBox[{
           RowBox[{"aVe", "[", "e", "]"}], ".", 
           RowBox[{"WM", "[", "e", "]"}], ".", 
           RowBox[{"Inverse", "[", 
            RowBox[{"ZM", "[", "e", "]"}], "]"}]}], "+", 
          RowBox[{
           RowBox[{"He", "[", "e", "]"}], ".", 
           RowBox[{"WM", "[", "e", "]"}]}], "+", 
          RowBox[{
           RowBox[{"Ve", "[", "e", "]"}], ".", 
           RowBox[{"WM", "[", "e", "]"}], ".", 
           RowBox[{"ZM", "[", "e", "]"}]}]}], "]"}], "]"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"e", ",", 
       RowBox[{"-", "2"}], ",", "2", ",", "0.1"}], "}"}]}], "]"}], ",", 
   RowBox[{"Frame", "\[Rule]", "True"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.476278136597708*^9, 3.4762781749309006`*^9}, {
  3.476278226216834*^9, 3.476278256677576*^9}, {3.4762790054564037`*^9, 
  3.4762790425145235`*^9}}],

Cell[BoxData[
 GraphicsBox[{{}, {}, 
   {Hue[0.67, 0.6, 0.6], LineBox[CompressedData["
1:eJxTTMoPSmViYGDQBGIQDQUH9vdrc3ZGf7JJA4N/+zcvN16QwPPe5uwZEPiz
36VVOzgx4rqNMRj83g/R9tJm1kwQ+Ln/Pa/nx8/Gt20g4j+g8keh5n3bv3Dx
Zt6nQc9twMad+bJ/qpyulr71Hah5n/cXHJlr2Vt2D2rex/3B0besInxuQs37
sL+zRyFwnvpdqP43+zNtlr5QEr9rMwOs/uX+ApGQ118FH0Dte7a/Ty6wrsfj
po0R2PzH+y0/JH+T3nkZat6D/RUy5scfMl6E6r+5/1bO/TNlPx7YGIDVX97/
511ypvHVW1D5k/u7HrNLie+9YTMBzN8JNe+xDSwA/+/cZ2wz6ZLNAoi8vftl
mwXvM+9B+SftVU3LH3mLvrCxgJhvD/MfRP6m/cNQKbHUHph5D+xh9ptA3G//
ROBJcTj/TZsMiP/sd+jmvJuf8dBmDsT/9p/Njb+qm9+yuQAJH/tLH2ubQmOu
wcLPXvjWrgh5k2ew8LUHCzc8hJr/2X5D4kp367l3bc5B4se+o6Hsasz0J1D7
vsH1Q+PX/q7JrX9+frdg8W9/60PvJ/5f96Dm/bY32romYp3aR6h5f+wFNsee
THB/ADXvn/3up/NmxrS/h4Wfg5Dm7/L9U7/bAAAbITP2
     "]]}},
  AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
  Axes->True,
  AxesOrigin->{0, 1.*^-15},
  Frame->True,
  PlotRange->{{-2., 2.}, {5.828670879282072*^-16, 5.236911533344271*^-15}},
  PlotRangeClipping->True,
  PlotRangePadding->{
    Scaled[0.02], 
    Scaled[0.02]}]], "Output",
 CellChangeTimes->{
  3.476278104741886*^9, {3.476278146128253*^9, 3.4762782589327054`*^9}, {
   3.4762790082165623`*^9, 3.4762790431625605`*^9}, 3.476280189458125*^9, {
   3.4762808308828125`*^9, 3.476280847606769*^9}, 3.476281688087842*^9, 
   3.4763447141618223`*^9, 3.4763455258532486`*^9, 3.4763455821754694`*^9, 
   3.4763471100788608`*^9, 3.4763473174667225`*^9, 3.4763481748737636`*^9, 
   3.4763482204313693`*^9, 3.4763589355343695`*^9, 3.4764697326338706`*^9, 
   3.4764807340281143`*^9, 3.476485793764515*^9, 3.4764858761502266`*^9, 
   3.47651991320879*^9, 3.4766050012352653`*^9, 3.476605086826161*^9, {
   3.4766052719087467`*^9, 3.476605286355573*^9}, 3.476605320611532*^9, {
   3.4766053614158664`*^9, 3.476605404967357*^9}, 3.4766312750207777`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["print out the W , Z, and Z*adj (Z)", "Subsubsection",
 CellChangeTimes->{{3.47628053186471*^9, 3.476280551739846*^9}, {
  3.476280623147931*^9, 3.476280648781397*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"e", " ", "=", " ", "1"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Round", "[", 
   RowBox[{
    RowBox[{"WM", "[", "e", "]"}], ",", "0.001"}], "]"}], " ", "//", " ", 
  "MatrixForm"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Round", "[", 
   RowBox[{
    RowBox[{"ZM", "[", "e", "]"}], ",", "0.001"}], "]"}], " ", "//", " ", 
  "MatrixForm"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Round", "[", 
   RowBox[{
    RowBox[{"Arg", "[", 
     RowBox[{"ZM", "[", "e", "]"}], " ", "]"}], ",", "0.001"}], "]"}], " ", "//",
   " ", "MatrixForm"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Round", "[", 
   RowBox[{
    RowBox[{"Abs", "[", 
     RowBox[{"ZM", "[", "e", "]"}], " ", "]"}], " ", ",", "0.001"}], "]"}], "//",
   " ", "MatrixForm"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Round", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"ZM", "[", "e", "]"}], ".", " ", 
     RowBox[{"ConjugateTranspose", "[", 
      RowBox[{"ZM", "[", "e", "]"}], "]"}]}], ",", "0.001"}], "]"}], "//", 
  " ", "MatrixForm"}]}], "Input",
 CellChangeTimes->{{3.4762734087892933`*^9, 3.4762734252742357`*^9}, {
  3.4762735728366756`*^9, 3.476273586126436*^9}, {3.476273798824602*^9, 
  3.4762738199378095`*^9}, {3.4762805008689365`*^9, 3.4762805277374735`*^9}, {
  3.4762805615454073`*^9, 3.4762805797004457`*^9}, {3.476280658869974*^9, 
  3.4762806975791883`*^9}, {3.4762826885980678`*^9, 3.476282702080839*^9}}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{"0.032`", "\[InvisibleSpace]", "-", 
       RowBox[{"0.667`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{"0.23900000000000002`", "\[InvisibleSpace]", "-", 
       RowBox[{"0.851`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "0.098`"}], "+", 
       RowBox[{"0.279`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{"0.359`", "\[InvisibleSpace]", "-", 
       RowBox[{"0.075`", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{"0.436`", "\[InvisibleSpace]", "+", 
       RowBox[{"0.604`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "0.097`"}], "-", 
       RowBox[{"0.458`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "0.811`"}], "+", 
       RowBox[{"0.506`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "0.166`"}], "-", 
       RowBox[{"0.916`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4762805669047136`*^9, 3.476280575918229*^9}, 
   3.4762806810692434`*^9, {3.4762808309008136`*^9, 3.4762808476227703`*^9}, 
   3.4762816881128435`*^9, 3.4762827031969028`*^9, 3.476344714255828*^9, 
   3.4763455258862505`*^9, 3.4763455821914706`*^9, 3.4763471101028624`*^9, 
   3.4763473175027246`*^9, 3.4763481748887644`*^9, 3.4763482204473705`*^9, 
   3.476358935549371*^9, 3.476469732704875*^9, 3.4764807340971184`*^9, 
   3.4764857938125176`*^9, 3.4764858761992297`*^9, 3.476519913265793*^9, 
   3.4766050013992743`*^9, 3.4766050868391614`*^9, {3.4766052720287533`*^9, 
   3.476605286398576*^9}, 3.4766053206285334`*^9, {3.4766053614628687`*^9, 
   3.4766054049843583`*^9}, 3.476631275130784*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{"1.32`", "\[InvisibleSpace]", "-", 
       RowBox[{"2.761`", " ", "\[ImaginaryI]"}]}], "0", "0", "0"},
     {"0", 
      RowBox[{"0.248`", "\[InvisibleSpace]", "+", 
       RowBox[{"0.969`", " ", "\[ImaginaryI]"}]}], "0", "0"},
     {"0", "0", 
      RowBox[{
       RowBox[{"-", "0.598`"}], "-", 
       RowBox[{"0.802`", " ", "\[ImaginaryI]"}]}], "0"},
     {"0", "0", "0", 
      RowBox[{"0.14100000000000001`", "\[InvisibleSpace]", "-", 
       RowBox[{"0.295`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4762805669047136`*^9, 3.476280575918229*^9}, 
   3.4762806810692434`*^9, {3.4762808309008136`*^9, 3.4762808476227703`*^9}, 
   3.4762816881128435`*^9, 3.4762827031969028`*^9, 3.476344714255828*^9, 
   3.4763455258862505`*^9, 3.4763455821914706`*^9, 3.4763471101028624`*^9, 
   3.4763473175027246`*^9, 3.4763481748887644`*^9, 3.4763482204473705`*^9, 
   3.476358935549371*^9, 3.476469732704875*^9, 3.4764807340971184`*^9, 
   3.4764857938125176`*^9, 3.4764858761992297`*^9, 3.476519913265793*^9, 
   3.4766050013992743`*^9, 3.4766050868391614`*^9, {3.4766052720287533`*^9, 
   3.476605286398576*^9}, 3.4766053206285334`*^9, {3.4766053614628687`*^9, 
   3.4766054049843583`*^9}, 3.476631275135784*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{"-", "1.125`"}], "0", "0", "0"},
     {"0", "1.32`", "0", "0"},
     {"0", "0", 
      RowBox[{"-", "2.212`"}], "0"},
     {"0", "0", "0", 
      RowBox[{"-", "1.125`"}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4762805669047136`*^9, 3.476280575918229*^9}, 
   3.4762806810692434`*^9, {3.4762808309008136`*^9, 3.4762808476227703`*^9}, 
   3.4762816881128435`*^9, 3.4762827031969028`*^9, 3.476344714255828*^9, 
   3.4763455258862505`*^9, 3.4763455821914706`*^9, 3.4763471101028624`*^9, 
   3.4763473175027246`*^9, 3.4763481748887644`*^9, 3.4763482204473705`*^9, 
   3.476358935549371*^9, 3.476469732704875*^9, 3.4764807340971184`*^9, 
   3.4764857938125176`*^9, 3.4764858761992297`*^9, 3.476519913265793*^9, 
   3.4766050013992743`*^9, 3.4766050868391614`*^9, {3.4766052720287533`*^9, 
   3.476605286398576*^9}, 3.4766053206285334`*^9, {3.4766053614628687`*^9, 
   3.4766054049843583`*^9}, 3.4766312751377845`*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {"3.06`", "0", "0", "0"},
     {"0", "1.`", "0", "0"},
     {"0", "0", "1.`", "0"},
     {"0", "0", "0", "0.327`"}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4762805669047136`*^9, 3.476280575918229*^9}, 
   3.4762806810692434`*^9, {3.4762808309008136`*^9, 3.4762808476227703`*^9}, 
   3.4762816881128435`*^9, 3.4762827031969028`*^9, 3.476344714255828*^9, 
   3.4763455258862505`*^9, 3.4763455821914706`*^9, 3.4763471101028624`*^9, 
   3.4763473175027246`*^9, 3.4763481748887644`*^9, 3.4763482204473705`*^9, 
   3.476358935549371*^9, 3.476469732704875*^9, 3.4764807340971184`*^9, 
   3.4764857938125176`*^9, 3.4764858761992297`*^9, 3.476519913265793*^9, 
   3.4766050013992743`*^9, 3.4766050868391614`*^9, {3.4766052720287533`*^9, 
   3.476605286398576*^9}, 3.4766053206285334`*^9, {3.4766053614628687`*^9, 
   3.4766054049843583`*^9}, 3.4766312751407843`*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {"9.365`", "0", "0", "0"},
     {"0", "1.`", "0", "0"},
     {"0", "0", "1.`", "0"},
     {"0", "0", "0", "0.107`"}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4762805669047136`*^9, 3.476280575918229*^9}, 
   3.4762806810692434`*^9, {3.4762808309008136`*^9, 3.4762808476227703`*^9}, 
   3.4762816881128435`*^9, 3.4762827031969028`*^9, 3.476344714255828*^9, 
   3.4763455258862505`*^9, 3.4763455821914706`*^9, 3.4763471101028624`*^9, 
   3.4763473175027246`*^9, 3.4763481748887644`*^9, 3.4763482204473705`*^9, 
   3.476358935549371*^9, 3.476469732704875*^9, 3.4764807340971184`*^9, 
   3.4764857938125176`*^9, 3.4764858761992297`*^9, 3.476519913265793*^9, 
   3.4766050013992743`*^9, 3.4766050868391614`*^9, {3.4766052720287533`*^9, 
   3.476605286398576*^9}, 3.4766053206285334`*^9, {3.4766053614628687`*^9, 
   3.4766054049843583`*^9}, 3.4766312751437845`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["\<\
Plot the determinant of Z*adj (Z), so the products of all of z eigenvalues\
\>", "Subsubsection",
 CellChangeTimes->{{3.4762807180953617`*^9, 3.476280743744828*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ListLinePlot", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"Table", "[", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"e", ",", 
         RowBox[{"Re", "[", 
          RowBox[{"Det", "[", 
           RowBox[{
            RowBox[{"ZM", "[", "e", "]"}], " ", ".", 
            RowBox[{"ConjugateTranspose", "[", 
             RowBox[{"ZM", "[", "e", "]"}], "]"}]}], "]"}], "]"}]}], "}"}], 
       ",", 
       RowBox[{"{", 
        RowBox[{"e", ",", 
         RowBox[{"-", "2"}], ",", "2", ",", "0.1"}], "}"}]}], "]"}], ",", 
     RowBox[{"Table", "[", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"e", ",", 
         RowBox[{"Im", "[", 
          RowBox[{"Det", "[", 
           RowBox[{
            RowBox[{"ZM", "[", "e", "]"}], " ", ".", 
            RowBox[{"ConjugateTranspose", "[", 
             RowBox[{"ZM", "[", "e", "]"}], "]"}]}], "]"}], "]"}]}], "}"}], 
       ",", 
       RowBox[{"{", 
        RowBox[{"e", ",", 
         RowBox[{"-", "2"}], ",", "2", ",", "0.1"}], "}"}]}], "]"}]}], "}"}], 
   ",", 
   RowBox[{"Frame", "\[Rule]", "True"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.4762802174147243`*^9, 3.4762802217839737`*^9}, {
  3.476280303162629*^9, 3.4762803590718265`*^9}, {3.476280583470661*^9, 
  3.476280588085925*^9}}],

Cell[BoxData[
 GraphicsBox[{{}, {}, 
   {Hue[0.67, 0.6, 0.6], LineBox[CompressedData["
1:eJxVkb1OAlEQhRcQFAVCaWFjaWfUgu74DDwCicTOV7FUQ8FrUB1bEjQmVlSa
mBAgJEBWNuDy596Zu8lMstmcved+O2fmvPFQv8sGQXDx/yRvrddwl9QUTVdb
yucZ3npJrZlTfe0q5onql+ekVsyolntLFlQLL2JFtcP1flk2vJBFw5szb3gz
Hpv7Ey603yfnH3Fj+h/Q57ly/B8eGt43q6rlfj/Nd+n8n4wNv8ud6kenO6nf
D/BPz9tyDp9PdDfVNeHjy/j7OLP9wee/kf5xqvpe8qGkuiX54efzIfPBUPl+
jwd2vqgafoiV+t9lP8iY/0Uomv6WOLL7h9+H8GJMDG+NrOFt0750fLdj9e8B
PD4WqQ==
     "]]}, 
   {Hue[0.9060679774997897, 0.6, 0.6], LineBox[CompressedData["
1:eJxdkb0KwjAUhYNv4ugm6uBWn8FHEBQ3X8VRxcHXcNK1UEXo1K0gCIJDpVJa
Worm3uZIz4GQfNzky193tprOO8aY3q/ZvsnZDRaS+uT4EthU4KGkBO+2NgVY
k4PVl4FFF3zIl5LvTb6E1r/AG5n/pP0e4IH47+SLaX0E7sv8kOo+eC18JN8/
B617bfbBY/VTPfLalhg80vODl3o/8F7vD77p+5AvATfvS/4UfNX/of0y8uXk
K8hXkq8iX00+M3GDLz8kmBQ=
     "]]}},
  AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
  Axes->True,
  AxesOrigin->{0, 0},
  Frame->True,
  PlotRange->{{-2., 2.}, {0., 1.0000000000000062`}},
  PlotRangeClipping->True,
  PlotRangePadding->{
    Scaled[0.02], 
    Scaled[0.02]}]], "Output",
 CellChangeTimes->{
  3.476280189562131*^9, 3.4762802231580524`*^9, {3.476280308847954*^9, 
   3.4762803596128573`*^9}, 3.47628058869596*^9, {3.4762808309728174`*^9, 
   3.4762808476807733`*^9}, 3.476281688172847*^9, 3.4763447143278313`*^9, 
   3.476345525975255*^9, 3.4763455822924767`*^9, 3.476347110225869*^9, 
   3.4763473175647287`*^9, 3.476348174950768*^9, 3.476348220514374*^9, 
   3.4763589356193743`*^9, 3.4764697327778788`*^9, 3.4764807342061243`*^9, 
   3.4764857938935223`*^9, 3.476485876341238*^9, 3.4765199133948*^9, 
   3.47660500148728*^9, 3.476605086901165*^9, {3.4766052724967804`*^9, 
   3.4766052866895924`*^9}, 3.476605320695537*^9, {3.476605361585876*^9, 
   3.4766054050523624`*^9}, 3.4766312752547913`*^9}]
}, Open  ]]
}, Closed]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Group Velocities and separation by directions", "Subsection",
 CellChangeTimes->{{3.476358897797211*^9, 3.4763589104109325`*^9}}],

Cell[CellGroupData[{

Cell["Calculating group velocities", "Subsubsection",
 CellChangeTimes->{{3.4763493075295477`*^9, 3.4763493127038436`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"GroupV", "[", "e_", "]"}], ":=", 
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{"-", "\[ImaginaryI]"}], " ", 
      RowBox[{
       RowBox[{
        RowBox[{"Conjugate", "[", 
         RowBox[{
          RowBox[{"WM", "[", "e", "]"}], "[", 
          RowBox[{"[", 
           RowBox[{"All", ",", "#"}], "]"}], "]"}], "]"}], ".", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{"aV", "-", 
             RowBox[{"e", " ", "aT"}]}], ")"}], "/", 
           RowBox[{
            RowBox[{"getz", "[", "e", "]"}], "[", 
            RowBox[{"[", "#", "]"}], "]"}]}], " ", "-", " ", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"V", " ", "-", " ", 
             RowBox[{"e", " ", "T"}]}], ")"}], " ", 
           RowBox[{
            RowBox[{"getz", "[", "e", "]"}], "[", 
            RowBox[{"[", "#", "]"}], "]"}]}]}], ")"}], ".", 
        RowBox[{
         RowBox[{"WM", "[", "e", "]"}], "[", 
         RowBox[{"[", 
          RowBox[{"All", ",", "#"}], "]"}], "]"}]}], "/", 
       RowBox[{
        RowBox[{"Conjugate", "[", 
         RowBox[{
          RowBox[{"WM", "[", "e", "]"}], "[", 
          RowBox[{"[", 
           RowBox[{"All", ",", "#"}], "]"}], "]"}], "]"}], ".", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"aT", "/", 
           RowBox[{
            RowBox[{"getz", "[", "e", "]"}], "[", 
            RowBox[{"[", "#", "]"}], "]"}]}], " ", "+", " ", "S", " ", "+", 
          " ", 
          RowBox[{"T", " ", 
           RowBox[{
            RowBox[{"getz", "[", "e", "]"}], "[", 
            RowBox[{"[", "#", "]"}], "]"}]}]}], ")"}], ".", 
        RowBox[{
         RowBox[{"WM", "[", "e", "]"}], "[", 
         RowBox[{"[", 
          RowBox[{"All", ",", "#"}], "]"}], "]"}]}]}]}], " ", "&"}], " ", "/@",
     "  ", 
    RowBox[{"Table", "[", 
     RowBox[{"i", ",", 
      RowBox[{"{", 
       RowBox[{"i", ",", "1", ",", 
        RowBox[{"2", 
         RowBox[{"Length", "[", "H", "]"}]}]}], "}"}]}], "]"}]}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.476349355179273*^9, 3.47634939184237*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell["Print group velocities for e", "Subsubsection",
 CellChangeTimes->{{3.4763495555117316`*^9, 3.4763495627371445`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"Round", "[", 
   RowBox[{
    RowBox[{"DiagonalMatrix", "[", 
     RowBox[{"GroupV", "[", "e", "]"}], "]"}], ",", "0.001"}], "]"}], " ", "//",
   " ", "MatrixForm"}]], "Input",
 CellChangeTimes->{{3.4763495725217047`*^9, 3.476349611515935*^9}}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "0.171`"}], "+", 
       RowBox[{"1.419`", " ", "\[ImaginaryI]"}]}], "0", "0", "0"},
     {"0", 
      RowBox[{"-", "1.454`"}], "0", "0"},
     {"0", "0", "0.885`", "0"},
     {"0", "0", "0", 
      RowBox[{
       RowBox[{"-", "0.025`"}], "-", 
       RowBox[{"0.776`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.476349588372611*^9, 3.4763496120589657`*^9}, 
   3.476358935645376*^9, 3.476469732830882*^9, 3.476480734263128*^9, 
   3.4764857939385247`*^9, 3.47648587638024*^9, 3.476519913413801*^9, 
   3.4766050015642843`*^9, 3.476605086932167*^9, {3.4766052725507836`*^9, 
   3.4766052867225943`*^9}, 3.4766053207165384`*^9, {3.47660536165588*^9, 
   3.4766054050813637`*^9}, 3.4766312752777925`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Group velocitiy pattern ", "Subsubsection",
 CellChangeTimes->{{3.4763559665955563`*^9, 3.476355972864915*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"GroupVPattern", "[", "e_", "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"If", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"Round", "[", 
        RowBox[{
         RowBox[{"Im", "[", "#", "]"}], ",", "0.0001"}], "]"}], "==", " ", 
       "0"}], ",", 
      RowBox[{"Re", "[", "#", "]"}], ",", "0"}], "]"}], " ", "&"}], " ", "/@",
    " ", 
   RowBox[{"GroupV", "[", "e", "]"}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ZPattern", "[", "e_", "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"If", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"Round", "[", 
        RowBox[{
         RowBox[{"#", "-", "1"}], ",", "0.0001"}], "]"}], " ", "\[Equal]", 
       " ", "0"}], ",", " ", "0", ",", 
      RowBox[{"#", "-", "1"}]}], "]"}], " ", "&"}], " ", "/@", " ", 
   RowBox[{"Abs", "[", 
    RowBox[{"getz", "[", "e", "]"}], "]"}]}]}]}], "Input",
 CellChangeTimes->{{3.4763559859756646`*^9, 3.4763559865346966`*^9}, {
   3.4763560503173447`*^9, 3.4763562247883244`*^9}, 3.476356261739437*^9, {
   3.476356620235942*^9, 3.4763567467911806`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"Sign", "[", 
  RowBox[{"GroupVPattern", "[", "e", "]"}], "]"}], "\[IndentingNewLine]", 
 RowBox[{"Sign", "[", 
  RowBox[{"ZPattern", "[", "e", "]"}], "]"}]}], "Input",
 CellChangeTimes->{{3.4763562277034907`*^9, 3.476356235454934*^9}, {
  3.476356551385004*^9, 3.4763565543151717`*^9}, {3.4763567507154055`*^9, 
  3.4763567599349327`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"0", ",", 
   RowBox[{"-", "1"}], ",", "1", ",", "0"}], "}"}]], "Output",
 CellChangeTimes->{{3.4763562365149946`*^9, 3.4763562633385286`*^9}, 
   3.4763565547711983`*^9, 3.4763567605449677`*^9, 3.476358935675378*^9, 
   3.476469732886885*^9, 3.4764807343421326`*^9, 3.4764857939675264`*^9, 
   3.476485876426243*^9, 3.4765199134678044`*^9, 3.4766050016482887`*^9, 
   3.476605086958168*^9, {3.4766052725987864`*^9, 3.4766052867635965`*^9}, 
   3.47660532074654*^9, {3.476605361722884*^9, 3.4766054051133657`*^9}, 
   3.476631275337796*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"1", ",", "0", ",", "0", ",", 
   RowBox[{"-", "1"}]}], "}"}]], "Output",
 CellChangeTimes->{{3.4763562365149946`*^9, 3.4763562633385286`*^9}, 
   3.4763565547711983`*^9, 3.4763567605449677`*^9, 3.476358935675378*^9, 
   3.476469732886885*^9, 3.4764807343421326`*^9, 3.4764857939675264`*^9, 
   3.476485876426243*^9, 3.4765199134678044`*^9, 3.4766050016482887`*^9, 
   3.476605086958168*^9, {3.4766052725987864`*^9, 3.4766052867635965`*^9}, 
   3.47660532074654*^9, {3.476605361722884*^9, 3.4766054051133657`*^9}, 
   3.476631275339796*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["\<\
Separating left and right moving (propagating and decaying) solutions : 
pp positive propagating 
pd positive decaying
np negative propagating
nd negative decaying\
\>", "Subsubsection",
 CellChangeTimes->{{3.4763436791936255`*^9, 3.476343722406097*^9}, {
  3.4763569964144583`*^9, 3.476357063351287*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"Zpp", "[", "e_", "]"}], ":=", 
   RowBox[{"Extract", "[", 
    RowBox[{
     RowBox[{"getz", "[", "e", "]"}], ",", 
     RowBox[{"Position", "[", 
      RowBox[{
       RowBox[{"Sign", "[", 
        RowBox[{"GroupVPattern", "[", "e", "]"}], "]"}], ",", "1"}], "]"}]}], 
    "]"}]}], "  "}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"Zpd", "[", "e_", "]"}], ":=", 
   RowBox[{"Extract", "[", 
    RowBox[{
     RowBox[{"getz", "[", "e", "]"}], ",", 
     RowBox[{"Position", "[", 
      RowBox[{
       RowBox[{"Sign", "[", 
        RowBox[{"ZPattern", "[", "e", "]"}], "]"}], ",", "1"}], "]"}]}], 
    "]"}]}], "  "}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Zp", "[", "e_", "]"}], ":=", 
  RowBox[{"Join", "[", 
   RowBox[{
    RowBox[{"Zpp", "[", "e", "]"}], ",", 
    RowBox[{"Zpd", "[", "e", "]"}]}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"Znp", "[", "e_", "]"}], ":=", 
   RowBox[{"Extract", "[", 
    RowBox[{
     RowBox[{"getz", "[", "e", "]"}], ",", 
     RowBox[{"Position", "[", 
      RowBox[{
       RowBox[{"Sign", "[", 
        RowBox[{"GroupVPattern", "[", "e", "]"}], "]"}], ",", 
       RowBox[{"-", "1"}]}], "]"}]}], "]"}]}], " "}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"Znd", "[", "e_", "]"}], ":=", 
   RowBox[{"Extract", "[", 
    RowBox[{
     RowBox[{"getz", "[", "e", "]"}], ",", 
     RowBox[{"Position", "[", 
      RowBox[{
       RowBox[{"Sign", "[", 
        RowBox[{"ZPattern", "[", "e", "]"}], "]"}], ",", 
       RowBox[{"-", "1"}]}], "]"}]}], "]"}]}], "  "}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"Zn", "[", "e_", "]"}], ":=", 
   RowBox[{"Join", "[", 
    RowBox[{
     RowBox[{"Znp", "[", "e", "]"}], ",", 
     RowBox[{"Znd", "[", "e", "]"}]}], "]"}]}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ZMpp", "[", "e_", "]"}], ":=", 
  RowBox[{"DiagonalMatrix", "[", 
   RowBox[{"Zpp", "[", "e", "]"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ZMp", "[", "e_", "]"}], ":=", 
  RowBox[{"DiagonalMatrix", "[", 
   RowBox[{"Zp", "[", "e", "]"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ZMnp", "[", "e_", "]"}], ":=", 
  RowBox[{"DiagonalMatrix", "[", 
   RowBox[{"Znp", "[", "e", "]"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"ZMn", "[", "e_", "]"}], ":=", 
   RowBox[{"DiagonalMatrix", "[", 
    RowBox[{"Zn", "[", "e", "]"}], "]"}]}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WMpp", "[", "e_", "]"}], ":=", 
  RowBox[{"Transpose", "[", 
   RowBox[{"Extract", "[", 
    RowBox[{
     RowBox[{"Transpose", "[", 
      RowBox[{"WM", "[", "e", "]"}], "]"}], ",", 
     RowBox[{"Position", "[", 
      RowBox[{
       RowBox[{"Sign", "[", 
        RowBox[{"GroupVPattern", "[", "e", "]"}], "]"}], ",", "1"}], "]"}]}], 
    "]"}], "  ", "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WMpd", "[", "e_", "]"}], ":=", 
  RowBox[{"Transpose", "[", 
   RowBox[{"Extract", "[", 
    RowBox[{
     RowBox[{"Transpose", "[", 
      RowBox[{"WM", "[", "e", "]"}], "]"}], ",", 
     RowBox[{"Position", "[", 
      RowBox[{
       RowBox[{"Sign", "[", 
        RowBox[{"ZPattern", "[", "e", "]"}], "]"}], ",", "1"}], "]"}]}], 
    "]"}], "  ", "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WMp", "[", "e_", "]"}], ":=", 
  RowBox[{"Transpose", "[", 
   RowBox[{"Join", "[", 
    RowBox[{
     RowBox[{"Transpose", "[", 
      RowBox[{"WMpp", "[", "e", "]"}], "]"}], ",", 
     RowBox[{"Transpose", "[", 
      RowBox[{"WMpd", "[", "e", "]"}], "]"}]}], "]"}], 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WMnp", "[", "e_", "]"}], ":=", 
  RowBox[{"Transpose", "[", 
   RowBox[{"Extract", "[", 
    RowBox[{
     RowBox[{"Transpose", "[", 
      RowBox[{"WM", "[", "e", "]"}], "]"}], ",", 
     RowBox[{"Position", "[", 
      RowBox[{
       RowBox[{"Sign", "[", 
        RowBox[{"GroupVPattern", "[", "e", "]"}], "]"}], ",", 
       RowBox[{"-", "1"}]}], "]"}]}], "]"}], "  ", 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WMnd", "[", "e_", "]"}], ":=", 
  RowBox[{"Transpose", "[", 
   RowBox[{"Extract", "[", 
    RowBox[{
     RowBox[{"Transpose", "[", 
      RowBox[{"WM", "[", "e", "]"}], "]"}], ",", 
     RowBox[{"Position", "[", 
      RowBox[{
       RowBox[{"Sign", "[", 
        RowBox[{"ZPattern", "[", "e", "]"}], "]"}], ",", 
       RowBox[{"-", "1"}]}], "]"}]}], "]"}], "  ", 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"WMn", "[", "e_", "]"}], ":=", 
  RowBox[{"Transpose", "[", 
   RowBox[{"Join", "[", 
    RowBox[{
     RowBox[{"Transpose", "[", 
      RowBox[{"WMnp", "[", "e", "]"}], "]"}], ",", 
     RowBox[{"Transpose", "[", 
      RowBox[{"WMnd", "[", "e", "]"}], "]"}]}], "]"}], "]"}]}]}], "Input",
 CellChangeTimes->{{3.476281588977173*^9, 3.476281626824338*^9}, {
  3.4762816665586104`*^9, 3.4762817586208763`*^9}, {3.476356958113268*^9, 
  3.4763569913641696`*^9}, {3.476357054111758*^9, 3.476357104346632*^9}, {
  3.4763571777508307`*^9, 3.476357203223287*^9}, {3.476357597504839*^9, 
  3.4763576731361647`*^9}, {3.4763577617972355`*^9, 3.4763578168283834`*^9}, {
  3.4763578658961897`*^9, 3.4763579303128743`*^9}, {3.4763581774470096`*^9, 
  3.4763582232816315`*^9}, {3.47635828270903*^9, 3.4763584293314166`*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell["printing separated matrix", "Subsubsection",
 CellChangeTimes->{{3.476358010354452*^9, 3.4763580177508755`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"Round", "[", 
   RowBox[{
    RowBox[{"ZMpp", "[", "e", "]"}], ",", "0.001"}], "]"}], " ", "//", " ", 
  "MatrixForm"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"Round", "[", 
    RowBox[{
     RowBox[{"WMpp", "[", "e", "]"}], ",", "0.001"}], "]"}], " ", "//", " ", 
   "MatrixForm"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Round", "[", 
   RowBox[{
    RowBox[{"ZMp", "[", "e", "]"}], ",", "0.001"}], "]"}], "  ", "//", " ", 
  "MatrixForm"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"Round", "[", 
    RowBox[{
     RowBox[{"WMp", "[", "e", "]"}], ",", "0.001"}], "]"}], "  ", "//", " ", 
   "MatrixForm"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Round", "[", 
   RowBox[{
    RowBox[{"ZMnp", "[", "e", "]"}], ",", "0.001"}], "]"}], "  ", "//", " ", 
  "MatrixForm"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"Round", "[", 
    RowBox[{
     RowBox[{"WMnp", "[", "e", "]"}], ",", "0.001"}], "]"}], "  ", "//", " ", 
   "MatrixForm"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Round", "[", 
   RowBox[{
    RowBox[{"ZMn", "[", "e", "]"}], ",", "0.001"}], "]"}], "  ", "//", " ", 
  "MatrixForm"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Round", "[", 
   RowBox[{
    RowBox[{"WMn", "[", "e", "]"}], ",", "0.001"}], "]"}], "  ", "//", " ", 
  "MatrixForm"}]}], "Input",
 CellChangeTimes->{{3.476357685529874*^9, 3.476357731884525*^9}, {
  3.4763578204155884`*^9, 3.4763578219926786`*^9}, {3.4763579397744155`*^9, 
  3.4763580020909796`*^9}, {3.4763582308100615`*^9, 3.4763582526243095`*^9}, {
  3.476358536843566*^9, 3.4763585535685225`*^9}}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "0.598`"}], "-", 
       RowBox[{"0.802`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4763577111983414`*^9, 3.4763577329335847`*^9}, 
   3.476357822873729*^9, 3.476357968158039*^9, 3.47635800314604*^9, 
   3.476358253641368*^9, 3.476358433443652*^9, 3.47635855439557*^9, 
   3.47635893571138*^9, 3.4764697329318876`*^9, 3.476480734405136*^9, 
   3.47648579402553*^9, 3.4764858764882464`*^9, 3.4765199135188074`*^9, 
   3.476605001862301*^9, 3.47660508699017*^9, {3.4766052726867914`*^9, 
   3.4766052868205996`*^9}, 3.476605320780542*^9, {3.476605361790888*^9, 
   3.476605405151368*^9}, 3.4766312755018053`*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "0.098`"}], "+", 
       RowBox[{"0.279`", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "0.811`"}], "+", 
       RowBox[{"0.506`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4763577111983414`*^9, 3.4763577329335847`*^9}, 
   3.476357822873729*^9, 3.476357968158039*^9, 3.47635800314604*^9, 
   3.476358253641368*^9, 3.476358433443652*^9, 3.47635855439557*^9, 
   3.47635893571138*^9, 3.4764697329318876`*^9, 3.476480734405136*^9, 
   3.47648579402553*^9, 3.4764858764882464`*^9, 3.4765199135188074`*^9, 
   3.476605001862301*^9, 3.47660508699017*^9, {3.4766052726867914`*^9, 
   3.4766052868205996`*^9}, 3.476605320780542*^9, {3.476605361790888*^9, 
   3.476605405151368*^9}, 3.4766312755408077`*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "0.598`"}], "-", 
       RowBox[{"0.802`", " ", "\[ImaginaryI]"}]}], "0"},
     {"0", 
      RowBox[{"1.32`", "\[InvisibleSpace]", "-", 
       RowBox[{"2.761`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4763577111983414`*^9, 3.4763577329335847`*^9}, 
   3.476357822873729*^9, 3.476357968158039*^9, 3.47635800314604*^9, 
   3.476358253641368*^9, 3.476358433443652*^9, 3.47635855439557*^9, 
   3.47635893571138*^9, 3.4764697329318876`*^9, 3.476480734405136*^9, 
   3.47648579402553*^9, 3.4764858764882464`*^9, 3.4765199135188074`*^9, 
   3.476605001862301*^9, 3.47660508699017*^9, {3.4766052726867914`*^9, 
   3.4766052868205996`*^9}, 3.476605320780542*^9, {3.476605361790888*^9, 
   3.476605405151368*^9}, 3.4766312755438075`*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "0.098`"}], "+", 
       RowBox[{"0.279`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{"0.032`", "\[InvisibleSpace]", "-", 
       RowBox[{"0.667`", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "0.811`"}], "+", 
       RowBox[{"0.506`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{"0.436`", "\[InvisibleSpace]", "+", 
       RowBox[{"0.604`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4763577111983414`*^9, 3.4763577329335847`*^9}, 
   3.476357822873729*^9, 3.476357968158039*^9, 3.47635800314604*^9, 
   3.476358253641368*^9, 3.476358433443652*^9, 3.47635855439557*^9, 
   3.47635893571138*^9, 3.4764697329318876`*^9, 3.476480734405136*^9, 
   3.47648579402553*^9, 3.4764858764882464`*^9, 3.4765199135188074`*^9, 
   3.476605001862301*^9, 3.47660508699017*^9, {3.4766052726867914`*^9, 
   3.4766052868205996`*^9}, 3.476605320780542*^9, {3.476605361790888*^9, 
   3.476605405151368*^9}, 3.4766312755598087`*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{"0.248`", "\[InvisibleSpace]", "+", 
       RowBox[{"0.969`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4763577111983414`*^9, 3.4763577329335847`*^9}, 
   3.476357822873729*^9, 3.476357968158039*^9, 3.47635800314604*^9, 
   3.476358253641368*^9, 3.476358433443652*^9, 3.47635855439557*^9, 
   3.47635893571138*^9, 3.4764697329318876`*^9, 3.476480734405136*^9, 
   3.47648579402553*^9, 3.4764858764882464`*^9, 3.4765199135188074`*^9, 
   3.476605001862301*^9, 3.47660508699017*^9, {3.4766052726867914`*^9, 
   3.4766052868205996`*^9}, 3.476605320780542*^9, {3.476605361790888*^9, 
   3.476605405151368*^9}, 3.476631275562809*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{"0.23900000000000002`", "\[InvisibleSpace]", "-", 
       RowBox[{"0.851`", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "0.097`"}], "-", 
       RowBox[{"0.458`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4763577111983414`*^9, 3.4763577329335847`*^9}, 
   3.476357822873729*^9, 3.476357968158039*^9, 3.47635800314604*^9, 
   3.476358253641368*^9, 3.476358433443652*^9, 3.47635855439557*^9, 
   3.47635893571138*^9, 3.4764697329318876`*^9, 3.476480734405136*^9, 
   3.47648579402553*^9, 3.4764858764882464`*^9, 3.4765199135188074`*^9, 
   3.476605001862301*^9, 3.47660508699017*^9, {3.4766052726867914`*^9, 
   3.4766052868205996`*^9}, 3.476605320780542*^9, {3.476605361790888*^9, 
   3.476605405151368*^9}, 3.476631275565809*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{"0.248`", "\[InvisibleSpace]", "+", 
       RowBox[{"0.969`", " ", "\[ImaginaryI]"}]}], "0"},
     {"0", 
      RowBox[{"0.14100000000000001`", "\[InvisibleSpace]", "-", 
       RowBox[{"0.295`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4763577111983414`*^9, 3.4763577329335847`*^9}, 
   3.476357822873729*^9, 3.476357968158039*^9, 3.47635800314604*^9, 
   3.476358253641368*^9, 3.476358433443652*^9, 3.47635855439557*^9, 
   3.47635893571138*^9, 3.4764697329318876`*^9, 3.476480734405136*^9, 
   3.47648579402553*^9, 3.4764858764882464`*^9, 3.4765199135188074`*^9, 
   3.476605001862301*^9, 3.47660508699017*^9, {3.4766052726867914`*^9, 
   3.4766052868205996`*^9}, 3.476605320780542*^9, {3.476605361790888*^9, 
   3.476605405151368*^9}, 3.4766312755688095`*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{"0.23900000000000002`", "\[InvisibleSpace]", "-", 
       RowBox[{"0.851`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{"0.359`", "\[InvisibleSpace]", "-", 
       RowBox[{"0.075`", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "0.097`"}], "-", 
       RowBox[{"0.458`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "0.166`"}], "-", 
       RowBox[{"0.916`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4763577111983414`*^9, 3.4763577329335847`*^9}, 
   3.476357822873729*^9, 3.476357968158039*^9, 3.47635800314604*^9, 
   3.476358253641368*^9, 3.476358433443652*^9, 3.47635855439557*^9, 
   3.47635893571138*^9, 3.4764697329318876`*^9, 3.476480734405136*^9, 
   3.47648579402553*^9, 3.4764858764882464`*^9, 3.4765199135188074`*^9, 
   3.476605001862301*^9, 3.47660508699017*^9, {3.4766052726867914`*^9, 
   3.4766052868205996`*^9}, 3.476605320780542*^9, {3.476605361790888*^9, 
   3.476605405151368*^9}, 3.4766312755718093`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Generating dual vectors", "Subsubsection",
 CellChangeTimes->{{3.476365787532689*^9, 3.4763657916669254`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"DWMp", "[", "e_", "]"}], ":=", 
  RowBox[{"Inverse", "[", 
   RowBox[{"WMp", "[", "e", "]"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"DWMn", "[", "e_", "]"}], ":=", 
  RowBox[{"Inverse", "[", 
   RowBox[{"WMn", "[", "e", "]"}], "]"}]}]}], "Input",
 CellChangeTimes->{{3.4763658163933396`*^9, 3.476365864385084*^9}, {
  3.476365908525609*^9, 3.476365919255223*^9}, {3.4763779819906282`*^9, 
  3.4763779872369285`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"DWMp", "[", "e", "]"}], " ", "//", " ", "MatrixForm"}]], "Input",
 CellChangeTimes->{{3.476365923310455*^9, 3.4763659315449257`*^9}, {
  3.47637781417403*^9, 3.47637781941533*^9}}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "1.0172746801311212`"}], "-", 
       RowBox[{"0.1935594774036607`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "0.6051212319362842`"}], "-", 
       RowBox[{"0.7036972200397701`", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "0.3355045567367454`"}], "+", 
       RowBox[{"1.2854869679904068`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "0.16721174376344494`"}], "-", 
       RowBox[{"0.3750662731354813`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{
  3.4763659267646523`*^9, 3.476377819985362*^9, 3.476469733060895*^9, 
   3.4764807345911465`*^9, 3.476485794124535*^9, 3.476485876616254*^9, 
   3.4765199136638155`*^9, 3.4766050019853077`*^9, 3.4766050870891757`*^9, {
   3.4766052728317995`*^9, 3.4766052869556074`*^9}, 3.476605320881548*^9, {
   3.4766053620149007`*^9, 3.4766054052593737`*^9}, 3.4766312756288123`*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"VM", "[", "e_", "]"}], ":=", 
  RowBox[{
   RowBox[{"Ve", "[", "e", "]"}], ".", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"WMp", "[", "e", "]"}], ".", 
      RowBox[{"ZMp", "[", "e", "]"}], ".", 
      RowBox[{"DWMp", "[", "e", "]"}]}], "-", 
     RowBox[{
      RowBox[{"WMn", "[", "e", "]"}], ".", 
      RowBox[{"ZMn", "[", "e", "]"}], ".", 
      RowBox[{"DWMn", "[", "e", "]"}]}]}], ")"}]}]}]], "Input",
 CellChangeTimes->{{3.476377876624602*^9, 3.4763779750172296`*^9}, 
   3.476469985182316*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"Inverse", "[", 
   RowBox[{"VM", "[", "e", "]"}], "]"}], " ", "//", " ", 
  "MatrixForm"}]], "Input",
 CellChangeTimes->{{3.4763779976545243`*^9, 3.4763780134444275`*^9}}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{"0.03929022401356619`", "\[InvisibleSpace]", "+", 
       RowBox[{"0.2722836749963715`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "0.2714510855075682`"}], "+", 
       RowBox[{"0.34320843121907024`", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "0.34481425855619385`"}], "+", 
       RowBox[{"0.10057330841533323`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{"0.32029941200890893`", "\[InvisibleSpace]", "+", 
       RowBox[{"0.5423026390726589`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.476378001284732*^9, 3.4763780140764637`*^9}, 
   3.476469733134899*^9, 3.476480734668151*^9, 3.4764857942095404`*^9, 
   3.476485876697258*^9, 3.4765199137478204`*^9, 3.4766050020983143`*^9, 
   3.4766050871541796`*^9, {3.476605272922805*^9, 3.476605287014611*^9}, 
   3.4766053209485517`*^9, {3.4766053620959053`*^9, 3.4766054053243775`*^9}, 
   3.4766312757258177`*^9}]
}, Open  ]],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"gp", "[", "e_", "]"}], ":=", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"Id", "-", 
      RowBox[{
       RowBox[{"WMp", "[", "e", "]"}], ".", 
       RowBox[{"ZMp", "[", "e", "]"}], ".", 
       RowBox[{"DWMp", "[", "e", "]"}], ".", 
       RowBox[{"WMn", "[", "e", "]"}], ".", 
       RowBox[{"Inverse", "[", 
        RowBox[{"ZMn", "[", "e", "]"}], "]"}], ".", 
       RowBox[{"DWMn", "[", "e", "]"}]}]}], ")"}], ".", 
    RowBox[{"Inverse", "[", 
     RowBox[{"VM", "[", "e", "]"}], "]"}]}]}], " "}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"gn", "[", "e_", "]"}], ":=", 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"Id", "-", 
     RowBox[{
      RowBox[{"WMn", "[", "e", "]"}], ".", 
      RowBox[{"Inverse", "[", 
       RowBox[{"ZMn", "[", "e", "]"}], "]"}], ".", 
      RowBox[{"DWMn", "[", "e", "]"}], ".", 
      RowBox[{"WMp", "[", "e", "]"}], ".", 
      RowBox[{"ZMp", "[", "e", "]"}], ".", 
      RowBox[{"DWMp", "[", "e", "]"}]}]}], ")"}], ".", 
   RowBox[{"Inverse", "[", 
    RowBox[{"VM", "[", "e", "]"}], "]"}], " "}]}]}], "Input",
 CellChangeTimes->{{3.47637802188591*^9, 3.4763781993480606`*^9}, {
  3.4763787858776083`*^9, 3.476378795502158*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"gp", "[", "1", "]"}], " ", "//", " ", 
  "MatrixForm"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"gn", "[", "1", "]"}], " ", "//", " ", "MatrixForm"}]}], "Input",
 CellChangeTimes->{{3.4763781166313295`*^9, 3.4763781245257807`*^9}, {
   3.476469873412923*^9, 3.476469873761943*^9}, 3.4764699068918376`*^9, {
   3.476481135281065*^9, 3.4764811436725445`*^9}, {3.476485809137394*^9, 
   3.4764858277484584`*^9}, {3.476485884631712*^9, 3.476485884828723*^9}}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "2.4827054932812933`"}], "+", 
       RowBox[{"1.8428726249223086`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{"1.3825694534583566`", "\[InvisibleSpace]", "+", 
       RowBox[{"0.5889391967040353`", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{"2.9754707990092193`", "\[InvisibleSpace]", "-", 
       RowBox[{"3.6826241702973928`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "3.2193592543906413`"}], "+", 
       RowBox[{"1.6425743766481817`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4763781201825323`*^9, 3.4763781250148087`*^9}, 
   3.4763782023862343`*^9, 3.4763787974572706`*^9, 3.4764697333569117`*^9, 
   3.4764698748860073`*^9, 3.4764699075248737`*^9, 3.4764699912846646`*^9, 
   3.476480734789158*^9, 3.476481144391586*^9, {3.4764857943355474`*^9, 
   3.4764858287265143`*^9}, {3.4764858768432665`*^9, 3.476485886010791*^9}, 
   3.476519913866827*^9, 3.476605002252323*^9, 3.4766050872621856`*^9, {
   3.4766052730698133`*^9, 3.476605287121617*^9}, 3.476605321057558*^9, {
   3.4766053622309127`*^9, 3.476605405432384*^9}, 3.4766312758598256`*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "1.0922878775646108`"}], "+", 
       RowBox[{"1.622079857596877`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "1.976858192054347`"}], "-", 
       RowBox[{"4.4084541710908915`", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{"1.329395027941878`", "\[InvisibleSpace]", "+", 
       RowBox[{"2.1096231598691064`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "8.614179603371362`"}], "+", 
       RowBox[{"2.499250313870868`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4763781201825323`*^9, 3.4763781250148087`*^9}, 
   3.4763782023862343`*^9, 3.4763787974572706`*^9, 3.4764697333569117`*^9, 
   3.4764698748860073`*^9, 3.4764699075248737`*^9, 3.4764699912846646`*^9, 
   3.476480734789158*^9, 3.476481144391586*^9, {3.4764857943355474`*^9, 
   3.4764858287265143`*^9}, {3.4764858768432665`*^9, 3.476485886010791*^9}, 
   3.476519913866827*^9, 3.476605002252323*^9, 3.4766050872621856`*^9, {
   3.4766052730698133`*^9, 3.476605287121617*^9}, 3.476605321057558*^9, {
   3.4766053622309127`*^9, 3.476605405432384*^9}, 3.4766312759488306`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"MMM", "=", 
  RowBox[{"-", 
   RowBox[{
    RowBox[{"WMn", "[", "e", "]"}], ".", 
    RowBox[{"Inverse", "[", 
     RowBox[{"ZMn", "[", "e", "]"}], "]"}], ".", 
    RowBox[{"DWMn", "[", "e", "]"}], ".", 
    RowBox[{"Inverse", "[", 
     RowBox[{"Ve", "[", "e", "]"}], "]"}]}]}]}]], "Input",
 CellChangeTimes->{{3.476469793861373*^9, 3.4764698087892265`*^9}, {
  3.476469912077134*^9, 3.476469918102479*^9}, {3.4764699628610387`*^9, 
  3.47646999609694*^9}, {3.4764866245020304`*^9, 3.476486633575549*^9}, {
  3.4764867172713366`*^9, 3.476486718607413*^9}, {3.4764867519243183`*^9, 
  3.476486773478551*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "1.0922878775646108`"}], "+", 
      RowBox[{"1.6220798575968771`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "1.9768581920543489`"}], "-", 
      RowBox[{"4.4084541710908915`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"1.3293950279418785`", "\[InvisibleSpace]", "+", 
      RowBox[{"2.109623159869106`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "8.61417960337136`"}], "+", 
      RowBox[{"2.4992503138708715`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
  "}"}]], "Output",
 CellChangeTimes->{{3.4764698008837748`*^9, 3.4764698093752604`*^9}, 
   3.4764699186565104`*^9, {3.47646996375309*^9, 3.4764699963479543`*^9}, 
   3.47648073483016*^9, 3.476485794467555*^9, 3.4764858770172763`*^9, 
   3.4764866341505823`*^9, 3.4764867192274485`*^9, {3.4764867524323473`*^9, 
   3.476486774195592*^9}, 3.4765199139988346`*^9, 3.476605002489337*^9, 
   3.4766050873891926`*^9, {3.476605273274825*^9, 3.476605287289626*^9}, 
   3.4766053211895657`*^9, {3.4766053624309244`*^9, 3.4766054055633917`*^9}, 
   3.476631275989833*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Attempts", "Subsubsection",
 CellChangeTimes->{{3.4763589515252843`*^9, 3.4763589630659447`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"He", "[", "e", "]"}], "-", 
   RowBox[{
    RowBox[{"aVe", "[", "e", "]"}], ".", "MMM", ".", 
    RowBox[{"Ve", "[", "e", "]"}]}], "-", 
   RowBox[{"Inverse", "[", "MMM", "]"}]}], "//", " ", "MatrixForm"}]], "Input",
 CellChangeTimes->{{3.476486729079012*^9, 3.476486733544267*^9}, {
   3.476605304051585*^9, 3.4766053087448535`*^9}, 3.476605340181652*^9, {
   3.476605384439183*^9, 3.4766053879813857`*^9}}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "3.3306690738754696`*^-16"}], "+", 
       RowBox[{"1.5543122344752192`*^-15", " ", "\[ImaginaryI]"}]}], 
      RowBox[{"2.6645352591003757`*^-15", "-", 
       RowBox[{"1.8318679906315083`*^-15", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "6.661338147750939`*^-16"}], "+", 
       RowBox[{"1.1934897514720433`*^-15", " ", "\[ImaginaryI]"}]}], 
      RowBox[{"1.5543122344752192`*^-15", "-", 
       RowBox[{"8.881784197001252`*^-16", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.476605362495928*^9, 3.4766054055823927`*^9}, 
   3.476631276020835*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  TagBox[
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {
       RowBox[{
        RowBox[{"-", "1.1102230246251565`*^-15"}], "+", 
        RowBox[{"1.9984014443252818`*^-15", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"2.886579864025407`*^-15", "-", 
        RowBox[{"1.8596235662471372`*^-15", " ", "\[ImaginaryI]"}]}]},
      {
       RowBox[{
        RowBox[{"-", "1.6653345369377348`*^-16"}], "+", 
        RowBox[{"1.3322676295501878`*^-15", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"1.9984014443252818`*^-15", "-", 
        RowBox[{"1.6653345369377348`*^-15", " ", "\[ImaginaryI]"}]}]}
     },
     GridBoxAlignment->{
      "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}},
        "RowsIndexed" -> {}},
     GridBoxSpacings->{"Columns" -> {
         Offset[0.27999999999999997`], {
          Offset[0.7]}, 
         Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
         Offset[0.2], {
          Offset[0.4]}, 
         Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
   Function[BoxForm`e$, 
    MatrixForm[BoxForm`e$]]], "\[IndentingNewLine]"}]], "Input",
 CellChangeTimes->{{3.4766053480461016`*^9, 3.476605348180109*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "1.1102230246251565`*^-15"}], "+", 
      RowBox[{"1.9984014443252818`*^-15", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"2.886579864025407`*^-15", "-", 
      RowBox[{"1.8596235662471372`*^-15", " ", "\[ImaginaryI]"}]}]}], "}"}], 
   ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "1.6653345369377348`*^-16"}], "+", 
      RowBox[{"1.3322676295501878`*^-15", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"1.9984014443252818`*^-15", "-", 
      RowBox[{"1.6653345369377348`*^-15", " ", "\[ImaginaryI]"}]}]}], "}"}]}],
   "}"}]], "Output",
 CellChangeTimes->{{3.4766053625739326`*^9, 3.4766054056033936`*^9}, 
   3.476631276070838*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"He", "[", "e", "]"}], "-", 
   RowBox[{
    RowBox[{"aVe", "[", "e", "]"}], ".", 
    RowBox[{"gn", "[", "e", "]"}], ".", 
    RowBox[{"Ve", "[", "e", "]"}]}], "-", 
   RowBox[{"Inverse", "[", 
    RowBox[{"gn", "[", "e", "]"}], "]"}]}], " ", "//", " ", 
  "MatrixForm"}]], "Input",
 CellChangeTimes->{{3.476378413815327*^9, 3.4763785113799076`*^9}, {
  3.476378810931041*^9, 3.476378811371066*^9}, {3.476378855985618*^9, 
  3.47637887874492*^9}, {3.476470149814732*^9, 3.476470172825048*^9}}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "4.440892098500626`*^-16"}], "+", 
       RowBox[{"1.3322676295501878`*^-15", " ", "\[ImaginaryI]"}]}], 
      RowBox[{"2.220446049250313`*^-15", "-", 
       RowBox[{"2.3314683517128287`*^-15", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "7.216449660063518`*^-16"}], "+", 
       RowBox[{"1.1657341758564144`*^-15", " ", "\[ImaginaryI]"}]}], 
      RowBox[{"1.9984014443252818`*^-15", "-", 
       RowBox[{"6.661338147750939`*^-16", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.4763784550936885`*^9, 3.476378512106949*^9}, {
   3.476378800001416*^9, 3.4763788119110975`*^9}, {3.4763788593228087`*^9, 
   3.4763788793159523`*^9}, 3.4764697335459228`*^9, 3.476470001954275*^9, {
   3.4764701512318134`*^9, 3.4764701735010867`*^9}, 3.4764807350321717`*^9, 
   3.4764857946605663`*^9, 3.476485877236289*^9, 3.476519914229848*^9, 
   3.476605002764353*^9, 3.4766050876052055`*^9, {3.476605273550841*^9, 
   3.476605287511639*^9}, 3.4766053214135785`*^9, {3.476605362807946*^9, 
   3.4766054057914047`*^9}, 3.4766312762788496`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"WMp", "[", "e", "]"}], ".", 
  RowBox[{"ZMp", "[", "e", "]"}], ".", 
  RowBox[{"DWMp", "[", "e", "]"}], ".", 
  RowBox[{"Inverse", "[", 
   RowBox[{
    RowBox[{"WMn", "[", "e", "]"}], ".", 
    RowBox[{"ZMn", "[", "e", "]"}], ".", 
    RowBox[{"DWMn", "[", "e", "]"}]}], "]"}]}]], "Input",
 CellChangeTimes->{{3.4764807201683216`*^9, 3.4764807938075333`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"0.330632867134377`", "\[InvisibleSpace]", "-", 
      RowBox[{"4.440763562877129`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "4.632714244917116`"}], "+", 
      RowBox[{"2.9587201312521363`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"0.5158202819176707`", "\[InvisibleSpace]", "+", 
      RowBox[{"7.4955950244058505`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"6.0837255207761824`", "\[InvisibleSpace]", "-", 
      RowBox[{"7.93582039627122`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
  "}"}]], "Output",
 CellChangeTimes->{{3.4764807350921755`*^9, 3.476480794306562*^9}, 
   3.4764857947575717`*^9, 3.476485877300293*^9, 3.4765199142878513`*^9, 
   3.476605002856358*^9, 3.4766050876672087`*^9, {3.476605273658847*^9, 
   3.476605287567642*^9}, 3.4766053214745817`*^9, {3.4766053628819504`*^9, 
   3.4766054058504076`*^9}, 3.476631276338853*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"g", "=", 
  RowBox[{"0", " ", "Id"}]}], "\[IndentingNewLine]", 
 RowBox[{"For", "[", 
  RowBox[{
   RowBox[{"i", "=", "1"}], ",", 
   RowBox[{"i", "<", "5"}], ",", 
   RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"g", " ", "=", 
     RowBox[{
      RowBox[{"Inverse", "[", 
       RowBox[{"He", "[", "e", "]"}], "]"}], ".", 
      RowBox[{"(", 
       RowBox[{"Id", "+", 
        RowBox[{
         RowBox[{"Ve", "[", "e", "]"}], ".", "g", ".", 
         RowBox[{"aVe", "[", "e", "]"}], ".", "g"}]}], ")"}]}]}], ";", 
    RowBox[{"Print", "[", 
     RowBox[{"MatrixForm", "[", "g", "]"}], " ", "]"}]}]}], 
  "]"}], "\[IndentingNewLine]", 
 RowBox[{"g", " ", "//", " ", "MatrixForm"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"g", "-", 
   RowBox[{"Inverse", "[", 
    RowBox[{
     RowBox[{"He", "[", "e", "]"}], "-", 
     RowBox[{
      RowBox[{"Ve", "[", "e", "]"}], ".", "g", ".", 
      RowBox[{"aVe", "[", "e", "]"}]}]}], "]"}]}], " ", "//", " ", 
  "MatrixForm"}]}], "Input",
 CellChangeTimes->{{3.4764810502031984`*^9, 3.476481124026421*^9}, {
  3.4764811568332977`*^9, 3.4764812134735374`*^9}, {3.4764814134409747`*^9, 
  3.4764814201563587`*^9}, {3.47648145252521*^9, 3.476481464796912*^9}, {
  3.4764815178559465`*^9, 3.4764815425203576`*^9}, {3.4764816686715727`*^9, 
  3.476481679513193*^9}, {3.476481718294411*^9, 3.47648173978164*^9}, {
  3.4764817754576807`*^9, 3.4764817982499847`*^9}, {3.4764820775289583`*^9, 
  3.476482118963328*^9}, {3.476482211923645*^9, 3.4764822398692436`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"0", ",", "0"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"0", ",", "0"}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.476482281619632*^9, 3.4764857947955737`*^9, 3.476485877331294*^9, 
   3.476519914320853*^9, 3.4766050029893656`*^9, 3.47660508768921*^9, {
   3.4766052736938486`*^9, 3.4766052876176453`*^9}, 3.476605321496583*^9, {
   3.4766053629079514`*^9, 3.47660540588841*^9}, 3.476631276370855*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "2.7777777777777786`"}], "+", 
       RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "2.2222222222222228`"}], "+", 
       RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "2.2222222222222228`"}], "+", 
       RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "2.7777777777777786`"}], "+", 
       RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Print",
 CellChangeTimes->{
  3.4764822816206317`*^9, 3.476485794811575*^9, 3.4764858773472953`*^9, 
   3.4765199145938687`*^9, 3.4766050031533747`*^9, 3.47660508769221*^9, {
   3.476605273696849*^9, 3.476605287633646*^9}, 3.4766053214985833`*^9, {
   3.4766053629219522`*^9, 3.4766054058924103`*^9}, 3.4766312765358644`*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "44.35871056241431`"}], "+", 
       RowBox[{"0.`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "37.030178326474655`"}], "+", 
       RowBox[{"4.706790123456797`", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "37.030178326474655`"}], "-", 
       RowBox[{"4.706790123456797`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "32.55315500685874`"}], "+", 
       RowBox[{"0.`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Print",
 CellChangeTimes->{
  3.4764822816206317`*^9, 3.476485794811575*^9, 3.4764858773472953`*^9, 
   3.4765199145938687`*^9, 3.4766050031533747`*^9, 3.47660508769221*^9, {
   3.476605273696849*^9, 3.476605287633646*^9}, 3.4766053214985833`*^9, {
   3.4766053629219522`*^9, 3.4766054058924103`*^9}, 3.476631276541865*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "10106.71846972497`"}], "+", 
       RowBox[{"48.887662418076616`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "8445.62284056398`"}], "+", 
       RowBox[{"1191.545380860719`", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "8292.782846184313`"}], "-", 
       RowBox[{"1099.3740155010173`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "7060.730464794736`"}], "+", 
       RowBox[{"24.849429869685082`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Print",
 CellChangeTimes->{
  3.4764822816206317`*^9, 3.476485794811575*^9, 3.4764858773472953`*^9, 
   3.4765199145938687`*^9, 3.4766050031533747`*^9, 3.47660508769221*^9, {
   3.476605273696849*^9, 3.476605287633646*^9}, 3.4766053214985833`*^9, {
   3.4766053629219522`*^9, 3.4766054058924103`*^9}, 3.476631276550865*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "5.175075218532227`*^8"}], "+", 
       RowBox[{"6.981550099850655`*^6", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "4.319453496902354`*^8"}], "+", 
       RowBox[{"6.4775232587540984`*^7", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "4.239826635020625`*^8"}], "-", 
       RowBox[{"5.1883693453690946`*^7", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "3.6044371543324125`*^8"}], "+", 
       RowBox[{"4.900797706589073`*^6", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Print",
 CellChangeTimes->{
  3.4764822816206317`*^9, 3.476485794811575*^9, 3.4764858773472953`*^9, 
   3.4765199145938687`*^9, 3.4766050031533747`*^9, 3.47660508769221*^9, {
   3.476605273696849*^9, 3.476605287633646*^9}, 3.4766053214985833`*^9, {
   3.4766053629219522`*^9, 3.4766054058924103`*^9}, 3.476631276559866*^9}]
}, Open  ]],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "5.175075218532227`*^8"}], "+", 
       RowBox[{"6.981550099850655`*^6", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "4.319453496902354`*^8"}], "+", 
       RowBox[{"6.4775232587540984`*^7", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "4.239826635020625`*^8"}], "-", 
       RowBox[{"5.1883693453690946`*^7", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "3.6044371543324125`*^8"}], "+", 
       RowBox[{"4.900797706589073`*^6", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{
  3.476482281619632*^9, 3.4764857947955737`*^9, 3.476485877331294*^9, 
   3.476519914320853*^9, 3.4766050029893656`*^9, 3.47660508768921*^9, {
   3.4766052736938486`*^9, 3.4766052876176453`*^9}, 3.476605321496583*^9, {
   3.4766053629079514`*^9, 3.47660540588841*^9}, 3.476631276569866*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "5.1750752174303234`*^8"}], "+", 
       RowBox[{"6.981550100493681`*^6", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "4.319453496598616`*^8"}], "+", 
       RowBox[{"6.477523293604936`*^7", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "4.23982663468344`*^8"}], "-", 
       RowBox[{"5.188369379657161`*^7", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "3.6044371433945614`*^8"}], "+", 
       RowBox[{"4.900797712336346`*^6", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{
  3.476482281619632*^9, 3.4764857947955737`*^9, 3.476485877331294*^9, 
   3.476519914320853*^9, 3.4766050029893656`*^9, 3.47660508768921*^9, {
   3.4766052736938486`*^9, 3.4766052876176453`*^9}, 3.476605321496583*^9, {
   3.4766053629079514`*^9, 3.47660540588841*^9}, 3.4766312765758667`*^9}]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["General lead routin", "Section",
 CellChangeTimes->{{3.476482974236247*^9, 3.4764829809066286`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"LeadGreenFunctions", "[", 
   RowBox[{"H_", ",", "S_", ",", "V_", ",", "T_", ",", "e_"}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "Id", ",", "He", ",", "Ve", ",", "aVe", ",", "lM", ",", "rM", ",", "z", 
      ",", "w", ",", "ZM", ",", "WM", ",", "GV", ",", "GVPattern", ",", 
      "ZPattern", ",", "Zpp", ",", "Zpd", ",", "Zp", ",", "Znp", ",", "Znd", 
      ",", "Zn", ",", "ZMp", ",", "ZMn", ",", "WMpp", ",", "WMpd", ",", "WMp",
       ",", "WMnp", ",", "WMnd", ",", "WMn", ",", "Dp", ",", "Dn"}], "}"}], 
    ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"Id", "=", " ", 
      RowBox[{"IdentityMatrix", "[", 
       RowBox[{"Length", "[", "H", "]"}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"He", "=", 
      RowBox[{
       RowBox[{"e", " ", "S"}], " ", "-", " ", "H"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"Ve", "=", 
      RowBox[{
       RowBox[{"e", " ", "T"}], "-", "V"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"aVe", " ", "=", 
      RowBox[{"ConjugateTranspose", "[", "Ve", "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"lM", "=", " ", 
      RowBox[{"ArrayFlatten", "[", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
           RowBox[{"-", "He"}], ",", 
           RowBox[{"-", "aVe"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"Id", ",", 
           RowBox[{"0", "Id"}]}], "}"}]}], "}"}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"rM", "=", 
      RowBox[{"ArrayFlatten", "[", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"Ve", ",", 
           RowBox[{"0", "Id"}]}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"0", " ", "Id"}], ",", "Id"}], "}"}]}], "}"}], "]"}]}], 
     ";", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"z", ",", "w"}], "}"}], "=", 
      RowBox[{"Eigensystem", "[", 
       RowBox[{"{", 
        RowBox[{"lM", ",", "rM"}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"Print", "[", " ", 
        RowBox[{"MatrixForm", "[", "z", "]"}], "]"}], ";"}], "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"Print", "[", " ", 
        RowBox[{"MatrixForm", "[", "w", "]"}], " ", "]"}], ";"}], "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"ZM", "=", 
      RowBox[{"DiagonalMatrix", "[", "z", "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"WM", "=", 
      RowBox[{"Transpose", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"Normalize", "[", "#", "]"}], " ", "&"}], " ", "/@", 
        RowBox[{"Transpose", "[", 
         RowBox[{
          RowBox[{"Transpose", "[", "w", "]"}], "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"1", ";;", 
             RowBox[{"Length", "[", "H", "]"}]}], ",", "All"}], "]"}], "]"}], 
         "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"Print", "[", " ", 
        RowBox[{"MatrixForm", "[", "WM", "]"}], " ", "]"}], ";"}], "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"GV", "=", 
      RowBox[{
       RowBox[{
        RowBox[{"\[ImaginaryI]", " ", 
         RowBox[{
          RowBox[{
           RowBox[{"Conjugate", "[", 
            RowBox[{"WM", "[", 
             RowBox[{"[", 
              RowBox[{"All", ",", "#"}], "]"}], "]"}], "]"}], ".", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"aVe", "/", 
              RowBox[{"z", "[", 
               RowBox[{"[", "#", "]"}], "]"}]}], " ", "-", " ", 
             RowBox[{"Ve", " ", 
              RowBox[{"z", "[", 
               RowBox[{"[", "#", "]"}], "]"}]}]}], ")"}], ".", 
           RowBox[{"WM", "[", 
            RowBox[{"[", 
             RowBox[{"All", ",", "#"}], "]"}], "]"}]}], " ", "/", 
          RowBox[{
           RowBox[{"Conjugate", "[", 
            RowBox[{"WM", "[", 
             RowBox[{"[", 
              RowBox[{"All", ",", "#"}], "]"}], "]"}], "]"}], ".", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{
              RowBox[{"ConjugateTranspose", "[", "T", "]"}], "/", 
              RowBox[{"z", "[", 
               RowBox[{"[", "#", "]"}], "]"}]}], " ", "+", " ", "S", " ", "+",
              " ", 
             RowBox[{"T", " ", 
              RowBox[{"z", "[", 
               RowBox[{"[", "#", "]"}], "]"}]}]}], ")"}], ".", 
           RowBox[{"WM", "[", 
            RowBox[{"[", 
             RowBox[{"All", ",", "#"}], "]"}], "]"}]}]}]}], "&"}], " ", "/@", 
       "  ", 
       RowBox[{"Table", "[", 
        RowBox[{"i", ",", 
         RowBox[{"{", 
          RowBox[{"i", ",", "1", ",", 
           RowBox[{"2", 
            RowBox[{"Length", "[", "H", "]"}]}]}], "}"}]}], "]"}]}]}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"Print", "[", " ", 
        RowBox[{"MatrixForm", "[", 
         RowBox[{"DiagonalMatrix", "[", "GV", "]"}], "]"}], " ", "]"}], ";"}],
       "*)"}], "\[IndentingNewLine]", 
     RowBox[{"GVPattern", "=", 
      RowBox[{
       RowBox[{
        RowBox[{"If", "[", 
         RowBox[{
          RowBox[{
           RowBox[{"Round", "[", 
            RowBox[{
             RowBox[{"Im", "[", "#", "]"}], ",", "0.0001"}], "]"}], "==", " ",
            "0"}], ",", 
          RowBox[{"Re", "[", "#", "]"}], ",", "0"}], "]"}], " ", "&"}], " ", "/@",
        " ", "GV"}]}], ";", 
     RowBox[{"ZPattern", "=", 
      RowBox[{
       RowBox[{
        RowBox[{"If", "[", 
         RowBox[{
          RowBox[{
           RowBox[{"Round", "[", 
            RowBox[{
             RowBox[{"#", "-", "1"}], ",", "0.0001"}], "]"}], " ", "\[Equal]",
            " ", "0"}], ",", " ", "0", ",", 
          RowBox[{"#", "-", "1"}]}], "]"}], " ", "&"}], " ", "/@", " ", 
       RowBox[{"Abs", "[", "z", "]"}]}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"Print", "[", " ", 
        RowBox[{"MatrixForm", "[", 
         RowBox[{"Sign", "[", "GVPattern", "]"}], "]"}], " ", "]"}], ";"}], 
      "*)"}], "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"Print", "[", " ", 
        RowBox[{"MatrixForm", "[", 
         RowBox[{"Sign", "[", "ZPattern", "]"}], "]"}], " ", "]"}], ";"}], 
      "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"Zpp", "=", 
      RowBox[{"Extract", "[", 
       RowBox[{"z", ",", 
        RowBox[{"Position", "[", 
         RowBox[{
          RowBox[{"Sign", "[", "GVPattern", "]"}], ",", "1"}], "]"}]}], 
       "]"}]}], "  ", ";", "\[IndentingNewLine]", 
     RowBox[{"Zpd", "=", 
      RowBox[{"Extract", "[", 
       RowBox[{"z", ",", 
        RowBox[{"Position", "[", 
         RowBox[{
          RowBox[{"Sign", "[", "ZPattern", "]"}], ",", "1"}], "]"}]}], 
       "]"}]}], "  ", ";", "\[IndentingNewLine]", 
     RowBox[{"Zp", "=", 
      RowBox[{"Join", "[", 
       RowBox[{"Zpp", ",", "Zpd"}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"Znp", "=", 
      RowBox[{"Extract", "[", 
       RowBox[{"z", ",", 
        RowBox[{"Position", "[", 
         RowBox[{
          RowBox[{"Sign", "[", "GVPattern", "]"}], ",", 
          RowBox[{"-", "1"}]}], "]"}]}], "]"}]}], " ", ";", 
     "\[IndentingNewLine]", 
     RowBox[{"Znd", "=", 
      RowBox[{"Extract", "[", 
       RowBox[{"z", ",", 
        RowBox[{"Position", "[", 
         RowBox[{
          RowBox[{"Sign", "[", "ZPattern", "]"}], ",", 
          RowBox[{"-", "1"}]}], "]"}]}], "]"}]}], "  ", ";", 
     "\[IndentingNewLine]", 
     RowBox[{"Zn", "=", 
      RowBox[{"Join", "[", 
       RowBox[{"Znp", ",", "Znd"}], "]"}]}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"ZMpp", "=", 
        RowBox[{"DiagonalMatrix", "[", "Zpp", "]"}]}], ";"}], "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"ZMp", "=", 
      RowBox[{"DiagonalMatrix", "[", "Zp", "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"ZMnp", "=", 
        RowBox[{"DiagonalMatrix", "[", "Znp", "]"}]}], ";"}], "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"ZMn", "=", 
      RowBox[{"DiagonalMatrix", "[", "Zn", "]"}]}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"WMpp", "=", 
      RowBox[{"Transpose", "[", 
       RowBox[{"Extract", "[", 
        RowBox[{
         RowBox[{"Transpose", "[", "WM", "]"}], ",", 
         RowBox[{"Position", "[", 
          RowBox[{
           RowBox[{"Sign", "[", "GVPattern", "]"}], ",", "1"}], "]"}]}], 
        "]"}], "  ", "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"WMpd", "=", 
      RowBox[{"Transpose", "[", 
       RowBox[{"Extract", "[", 
        RowBox[{
         RowBox[{"Transpose", "[", "WM", "]"}], ",", 
         RowBox[{"Position", "[", 
          RowBox[{
           RowBox[{"Sign", "[", "ZPattern", "]"}], ",", "1"}], "]"}]}], "]"}],
        "  ", "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"WMp", "=", 
      RowBox[{"Transpose", "[", 
       RowBox[{"Join", "[", 
        RowBox[{
         RowBox[{"Transpose", "[", "WMpp", "]"}], ",", 
         RowBox[{"Transpose", "[", "WMpd", "]"}]}], "]"}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"WMnp", "=", 
      RowBox[{"Transpose", "[", 
       RowBox[{"Extract", "[", 
        RowBox[{
         RowBox[{"Transpose", "[", "WM", "]"}], ",", 
         RowBox[{"Position", "[", 
          RowBox[{
           RowBox[{"Sign", "[", "GVPattern", "]"}], ",", 
           RowBox[{"-", "1"}]}], "]"}]}], "]"}], "  ", "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"WMnd", "=", 
      RowBox[{"Transpose", "[", 
       RowBox[{"Extract", "[", 
        RowBox[{
         RowBox[{"Transpose", "[", "WM", "]"}], ",", 
         RowBox[{"Position", "[", 
          RowBox[{
           RowBox[{"Sign", "[", "ZPattern", "]"}], ",", 
           RowBox[{"-", "1"}]}], "]"}]}], "]"}], "  ", "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"WMn", "=", 
      RowBox[{"Transpose", "[", 
       RowBox[{"Join", "[", 
        RowBox[{
         RowBox[{"Transpose", "[", "WMnp", "]"}], ",", 
         RowBox[{"Transpose", "[", "WMnd", "]"}]}], "]"}], "]"}]}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"Dp", "=", 
      RowBox[{"WMp", ".", "ZMp", ".", 
       RowBox[{"Inverse", "[", "WMp", "]"}]}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"Dn", "=", 
      RowBox[{"WMn", ".", "ZMn", ".", 
       RowBox[{"Inverse", "[", "WMn", "]"}]}]}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", 
        RowBox[{"Dp", ".", 
         RowBox[{"Inverse", "[", "aVe", "]"}]}]}], ",", 
       RowBox[{"-", 
        RowBox[{
         RowBox[{"Inverse", "[", "Dn", "]"}], ".", 
         RowBox[{"Inverse", "[", "Ve", "]"}]}]}]}], "}"}]}]}], 
   "\[IndentingNewLine]", "\[IndentingNewLine]", "]"}]}]], "Input",
 CellChangeTimes->{{3.476483046299369*^9, 3.4764831123111444`*^9}, {
   3.4764831430059*^9, 3.4764832724483037`*^9}, {3.47648330962743*^9, 
   3.476483318837957*^9}, {3.476483379611433*^9, 3.4764835003873415`*^9}, {
   3.476483625657506*^9, 3.4764837496595984`*^9}, {3.4764837802703495`*^9, 
   3.476483922488484*^9}, {3.4764840084574013`*^9, 3.4764840685888405`*^9}, {
   3.4764841012467084`*^9, 3.47648415075854*^9}, {3.476484233228257*^9, 
   3.4764845379376855`*^9}, {3.476484595328968*^9, 3.476484710317545*^9}, {
   3.476484891684919*^9, 3.476484912704121*^9}, {3.4764849444439363`*^9, 
   3.476485016780074*^9}, {3.4764851482255917`*^9, 3.476485178136303*^9}, 
   3.47648522931023*^9, {3.476485284118365*^9, 3.4764852881665964`*^9}, {
   3.4764855507896175`*^9, 3.47648557933125*^9}, {3.4764856519884057`*^9, 
   3.476485654236534*^9}, 3.4764857347511396`*^9, {3.476486005443622*^9, 
   3.476486032522171*^9}, {3.476486189173131*^9, 3.4764862026769032`*^9}, {
   3.4764862784932394`*^9, 3.47648628933886*^9}, {3.4764863452310567`*^9, 
   3.476486369681455*^9}, {3.4764868016471624`*^9, 3.4764868094846106`*^9}, {
   3.4765218115663695`*^9, 3.476521837748867*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"g1p", ",", "g1n"}], "}"}], "=", 
   RowBox[{"LeadGreenFunctions", "[", 
    RowBox[{"H", ",", "S", ",", "V", ",", "T", ",", "0.1"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"g1p", " ", "//", " ", "MatrixForm"}], "\[IndentingNewLine]", 
 RowBox[{"g1n", " ", "//", " ", "MatrixForm"}]}], "Input",
 CellChangeTimes->{{3.4764847237903156`*^9, 3.4764847427193985`*^9}, {
   3.4764849624789677`*^9, 3.476484971693495*^9}, 3.476485214315372*^9, {
   3.476485668076326*^9, 3.4764857037363653`*^9}, {3.476485864107538*^9, 
   3.4764858725240197`*^9}, {3.476486895984558*^9, 3.47648697468606*^9}, {
   3.4765198780797806`*^9, 3.476519905075324*^9}}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{"1.1614542558646241`", "\[InvisibleSpace]", "-", 
       RowBox[{"0.8912922736667364`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "0.6012645086193736`"}], "-", 
       RowBox[{"0.8604264123937804`", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "1.9337258290661543`"}], "+", 
       RowBox[{"2.5508435211517355`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{"0.8363766929422564`", "\[InvisibleSpace]", "-", 
       RowBox[{"1.299507274142684`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{
  3.4764855810153465`*^9, {3.4764856614009438`*^9, 3.4764856715235233`*^9}, 
   3.4764857043544006`*^9, 3.4764857950545883`*^9, 3.4764858774553013`*^9, 
   3.4764860371774373`*^9, 3.4764862069381466`*^9, 3.476486296949295*^9, {
   3.476486354099564*^9, 3.4764863742537165`*^9}, 3.476486811937751*^9, {
   3.476486914687628*^9, 3.476486975639114*^9}, 3.4765199147488775`*^9, 
   3.476605003275382*^9, 3.476605087759214*^9, {3.476605273784854*^9, 
   3.476605287927663*^9}, 3.4766053215645866`*^9, {3.476605363005957*^9, 
   3.4766054059424133`*^9}, 3.4766312766598716`*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{"1.0471007145045925`", "\[InvisibleSpace]", "-", 
       RowBox[{"0.900819716961112`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "0.7541129593889985`"}], "+", 
       RowBox[{"3.710623699789142`", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{
       RowBox[{"-", "1.3280373545108093`"}], "-", 
       RowBox[{"1.982477915585459`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{"5.3885624674023145`", "\[InvisibleSpace]", "-", 
       RowBox[{"0.9202388114801956`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{
  3.4764855810153465`*^9, {3.4764856614009438`*^9, 3.4764856715235233`*^9}, 
   3.4764857043544006`*^9, 3.4764857950545883`*^9, 3.4764858774553013`*^9, 
   3.4764860371774373`*^9, 3.4764862069381466`*^9, 3.476486296949295*^9, {
   3.476486354099564*^9, 3.4764863742537165`*^9}, 3.476486811937751*^9, {
   3.476486914687628*^9, 3.476486975639114*^9}, 3.4765199147488775`*^9, 
   3.476605003275382*^9, 3.476605087759214*^9, {3.476605273784854*^9, 
   3.476605287927663*^9}, 3.4766053215645866`*^9, {3.476605363005957*^9, 
   3.4766054059424133`*^9}, 3.476631276682873*^9}]
}, Open  ]]
}, Open  ]],

Cell["Scatterer", "Section",
 CellChangeTimes->{{3.4764829088955097`*^9, 3.4764829123357067`*^9}}],

Cell[CellGroupData[{

Cell["Transport calculation", "Section",
 CellChangeTimes->{{3.476520005598074*^9, 3.4765200109703813`*^9}}],

Cell[CellGroupData[{

Cell["Input", "Subsection",
 CellChangeTimes->{{3.4737883916261024`*^9, 3.473788397306428*^9}}],

Cell[CellGroupData[{

Cell["Scatterer", "Subsubsection",
 CellChangeTimes->{{3.476520521828601*^9, 3.4765205239057198`*^9}}],

Cell["Hamiltonian and overlap\t", "Text",
 CellChangeTimes->{{3.473788434915579*^9, 3.4737884488313746`*^9}, {
   3.4737885126860266`*^9, 3.473788515276175*^9}, {3.4765201079209266`*^9, 
   3.4765201089139833`*^9}, {3.476520161543994*^9, 3.4765201631270843`*^9}, 
   3.476520595911838*^9, {3.476520923825594*^9, 3.4765209496740723`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"Hs", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"0", "1"},
      {"1", "0"}
     }], "\[NoBreak]", ")"}]}], ";", " ", 
  RowBox[{"Ss", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"1", "0.2"},
      {"0.2", "1"}
     }], "\[NoBreak]", ")"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.4765205341143036`*^9, 3.4765205825550737`*^9}}]
}, Closed]],

Cell[CellGroupData[{

Cell["Lead 1", "Subsubsection",
 CellChangeTimes->{{3.4765201760938263`*^9, 3.4765201770848827`*^9}}],

Cell["Unit cell Hamiltonian and overlap\t", "Text",
 CellChangeTimes->{{3.473788434915579*^9, 3.4737884488313746`*^9}, {
  3.4737885126860266`*^9, 3.473788515276175*^9}, {3.4765201079209266`*^9, 
  3.4765201089139833`*^9}, {3.476520161543994*^9, 3.4765201631270843`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"HL1", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"0", "1"},
      {"1", "0"}
     }], "\[NoBreak]", ")"}]}], ";", " ", 
  RowBox[{"SL1", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"1", "0.2"},
      {"0.2", "1"}
     }], "\[NoBreak]", ")"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.44882844570161*^9, 3.4488284525188103`*^9}, {
  3.4488285229528103`*^9, 3.44882852587001*^9}, {3.4737882844799743`*^9, 
  3.473788366644674*^9}, {3.473788417243568*^9, 3.473788417612589*^9}, {
  3.4737885177613173`*^9, 3.473788537841466*^9}, {3.4762801847968583`*^9, 
  3.4762801855869036`*^9}, {3.476280843633542*^9, 3.4762808439225583`*^9}, {
  3.4763455188828497`*^9, 3.476345520383936*^9}, {3.476348213051947*^9, 
  3.4763482160831203`*^9}, {3.4765201229027834`*^9, 3.476520130872239*^9}}],

Cell["Unit Cell Coupling Hamiltonian and overlap", "Text",
 CellChangeTimes->{{3.473788460719054*^9, 3.473788465168309*^9}, {
  3.4737885662730923`*^9, 3.4737885692552624`*^9}, {3.4765206071174793`*^9, 
  3.4765206093566074`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"VL1", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"1", 
       RowBox[{"1", "/", "2"}]},
      {"0", 
       RowBox[{
        RowBox[{"1", "/", "2"}], "\[ImaginaryI]"}]}
     }], "\[NoBreak]", ")"}]}], ";", " ", 
  RowBox[{"TL1", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"0.1", "0"},
      {"0", "0"}
     }], "\[NoBreak]", ")"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.4737885434687877`*^9, 3.4737885932846365`*^9}, {
   3.476272092714018*^9, 3.476272095481176*^9}, {3.4762739241227684`*^9, 
   3.4762739243157797`*^9}, {3.4762739680802827`*^9, 3.476273968592312*^9}, 
   3.4763455226900673`*^9, 3.4763455715918646`*^9, {3.4763481687284117`*^9, 
   3.476348169235441*^9}, 3.476348217692213*^9, {3.476520137685629*^9, 
   3.476520146836152*^9}}],

Cell["Scatterer Coupling Hamiltonian and overlap", "Text",
 CellChangeTimes->{{3.476520973382428*^9, 3.476520983876028*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"KL1", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"1", 
       RowBox[{"1", "/", "2"}]},
      {"0", 
       RowBox[{
        RowBox[{"1", "/", "2"}], "\[ImaginaryI]"}]}
     }], "\[NoBreak]", ")"}]}], ";", " ", 
  RowBox[{"CL1", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"0.1", "0"},
      {"0", "0"}
     }], "\[NoBreak]", ")"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.4765209992969103`*^9, 3.476521007647388*^9}}]
}, Closed]],

Cell[CellGroupData[{

Cell["Lead 2", "Subsubsection",
 CellChangeTimes->{{3.4765201760938263`*^9, 3.4765201997951813`*^9}}],

Cell["Unit cell Hamiltonian and overlap\t", "Text",
 CellChangeTimes->{{3.473788434915579*^9, 3.4737884488313746`*^9}, {
  3.4737885126860266`*^9, 3.473788515276175*^9}, {3.4765201079209266`*^9, 
  3.4765201089139833`*^9}, {3.476520161543994*^9, 3.4765201631270843`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"HL2", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"0", "1"},
      {"1", "0"}
     }], "\[NoBreak]", ")"}]}], ";", " ", 
  RowBox[{"SL2", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"1", "0.2"},
      {"0.2", "1"}
     }], "\[NoBreak]", ")"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.44882844570161*^9, 3.4488284525188103`*^9}, {
  3.4488285229528103`*^9, 3.44882852587001*^9}, {3.4737882844799743`*^9, 
  3.473788366644674*^9}, {3.473788417243568*^9, 3.473788417612589*^9}, {
  3.4737885177613173`*^9, 3.473788537841466*^9}, {3.4762801847968583`*^9, 
  3.4762801855869036`*^9}, {3.476280843633542*^9, 3.4762808439225583`*^9}, {
  3.4763455188828497`*^9, 3.476345520383936*^9}, {3.476348213051947*^9, 
  3.4763482160831203`*^9}, {3.4765201229027834`*^9, 3.476520130872239*^9}, {
  3.4765202022293205`*^9, 3.476520204124429*^9}}],

Cell["Unit Cell Coupling Hamiltonian and overlap", "Text",
 CellChangeTimes->{{3.473788460719054*^9, 3.473788465168309*^9}, {
   3.4737885662730923`*^9, 3.4737885692552624`*^9}, 3.476520967891114*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"VL2", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"1", 
       RowBox[{"1", "/", "2"}]},
      {"0", 
       RowBox[{
        RowBox[{"1", "/", "2"}], "\[ImaginaryI]"}]}
     }], "\[NoBreak]", ")"}]}], ";", " ", 
  RowBox[{"TL2", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"0.1", "0"},
      {"0", "0"}
     }], "\[NoBreak]", ")"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.4737885434687877`*^9, 3.4737885932846365`*^9}, {
   3.476272092714018*^9, 3.476272095481176*^9}, {3.4762739241227684`*^9, 
   3.4762739243157797`*^9}, {3.4762739680802827`*^9, 3.476273968592312*^9}, 
   3.4763455226900673`*^9, 3.4763455715918646`*^9, {3.4763481687284117`*^9, 
   3.476348169235441*^9}, 3.476348217692213*^9, {3.476520137685629*^9, 
   3.476520146836152*^9}, {3.4765202063085537`*^9, 3.4765202085016794`*^9}}],

Cell["Scatterer Coupling Hamiltonian and overlap", "Text",
 CellChangeTimes->{{3.476520973382428*^9, 3.476520983876028*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"KL2", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"1", 
       RowBox[{"1", "/", "2"}]},
      {"0", 
       RowBox[{
        RowBox[{"1", "/", "2"}], "\[ImaginaryI]"}]}
     }], "\[NoBreak]", ")"}]}], ";", " ", 
  RowBox[{"CL2", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {"0.1", "0"},
      {"0", "0"}
     }], "\[NoBreak]", ")"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.4765209992969103`*^9, 3.4765210334138618`*^9}}]
}, Closed]],

Cell[CellGroupData[{

Cell["Leads together ", "Subsubsection",
 CellChangeTimes->{{3.476520284804044*^9, 3.4765203009859695`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"Leads", "=", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "HL1", ",", "SL1", ",", "VL1", ",", "TL1", ",", "KL1", ",", "CL1"}], 
      "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "HL2", ",", "SL2", ",", "VL2", ",", "TL2", ",", "KL2", ",", "CL2"}], 
      "}"}]}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.4765203570231743`*^9, 3.476520432756506*^9}, {
  3.4765230887574205`*^9, 3.476523101980177*^9}}]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["Extended system (not neccessary)", "Subsection",
 CellChangeTimes->{{3.476521889093804*^9, 3.476521896424223*^9}, {
  3.4765219853263083`*^9, 3.4765219972479897`*^9}}],

Cell[CellGroupData[{

Cell["Extended scatterer Hamiltonian and overlap", "Subsubsection",
 CellChangeTimes->{{3.476521116886636*^9, 3.4765211306544237`*^9}, {
  3.4765211613071766`*^9, 3.476521163782318*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Hsx", "=", 
   RowBox[{"ArrayFlatten", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"Hs", ",", "KL1", ",", "KL2"}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"ConjugateTranspose", "[", "KL1", "]"}], ",", "HL1", ",", 
        "0"}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"ConjugateTranspose", "[", "KL2", "]"}], ",", "0", ",", 
        "HL2"}], "}"}]}], "}"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Ssx", "=", 
   RowBox[{"ArrayFlatten", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"Ss", ",", "CL1", ",", "CL2"}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"ConjugateTranspose", "[", "CL1", "]"}], ",", "SL1", ",", 
        "0"}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"ConjugateTranspose", "[", "CL2", "]"}], ",", "0", ",", 
        "SL2"}], "}"}]}], "}"}], "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.4765211496995125`*^9, 3.4765211580189886`*^9}, {
  3.4765212638940444`*^9, 3.4765212713244696`*^9}, {3.476521413871623*^9, 
  3.4765215323604*^9}, {3.47652158446238*^9, 3.476521654451383*^9}, {
  3.4765219334033384`*^9, 3.4765219344043956`*^9}}]
}, Closed]],

Cell[CellGroupData[{

Cell["Print out Extended Hamiltonian", "Subsubsection",
 CellChangeTimes->{{3.476521941184783*^9, 3.476521970090437*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"Round", "[", 
   RowBox[{
    RowBox[{"N", "[", "Hsx", "]"}], ",", "0.01"}], "]"}], " ", "//", " ", 
  "MatrixForm"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Round", "[", 
   RowBox[{
    RowBox[{"N", "[", "Ssx", "]"}], ",", "0.01"}], "]"}], " ", "//", " ", 
  "MatrixForm"}]}], "Input"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {"0", "1.`", "1.`", "0.5`", "1.`", "0.5`"},
     {"1.`", "0", "0", 
      RowBox[{"0.5`", " ", "\[ImaginaryI]"}], "0", 
      RowBox[{"0.5`", " ", "\[ImaginaryI]"}]},
     {"1.`", "0", "0", "1.`", "0", "0"},
     {"0.5`", 
      RowBox[{
       RowBox[{"-", "0.5`"}], " ", "\[ImaginaryI]"}], "1.`", "0", "0", "0"},
     {"1.`", "0", "0", "0", "0", "1.`"},
     {"0.5`", 
      RowBox[{
       RowBox[{"-", "0.5`"}], " ", "\[ImaginaryI]"}], "0", "0", "1.`", "0"}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{
  3.476521514912402*^9, {3.4765216065596437`*^9, 3.476521654977413*^9}, 
   3.476605003384388*^9, 3.4766050878472195`*^9, {3.47660527388486*^9, 
   3.476605288122674*^9}, 3.476605321654592*^9, {3.476605363087962*^9, 
   3.4766054060094166`*^9}, 3.47663127680688*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {"1.`", "0.2`", "0.1`", "0", "0.1`", "0"},
     {"0.2`", "1.`", "0", "0", "0", "0"},
     {"0.1`", "0", "1.`", "0.2`", "0", "0"},
     {"0", "0", "0.2`", "1.`", "0", "0"},
     {"0.1`", "0", "0", "0", "1.`", "0.2`"},
     {"0", "0", "0", "0", "0.2`", "1.`"}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{
  3.476521514912402*^9, {3.4765216065596437`*^9, 3.476521654977413*^9}, 
   3.476605003384388*^9, 3.4766050878472195`*^9, {3.47660527388486*^9, 
   3.476605288122674*^9}, 3.476605321654592*^9, {3.476605363087962*^9, 
   3.4766054060094166`*^9}, 3.47663127680888*^9}]
}, Open  ]]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["Assembled system ", "Subsection",
 CellChangeTimes->{{3.476521889093804*^9, 3.476521896424223*^9}, {
  3.4765219853263083`*^9, 3.4765219972479897`*^9}, {3.4765221185219264`*^9, 
  3.4765221254923253`*^9}}],

Cell[CellGroupData[{

Cell["Extended scatterer Hamiltonian and overlap", "Subsubsection",
 CellChangeTimes->{{3.476521116886636*^9, 3.4765211306544237`*^9}, {
  3.4765211613071766`*^9, 3.476521163782318*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"TotalGreenFunction", "[", 
   RowBox[{"Hs_", ",", "Ss_", ",", "LeadSets_", ",", "e_"}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "leadnum", ",", "gpset", ",", "HLset", ",", "SLset", ",", "VLset", ",", 
      "TLset", ",", "KLset", ",", "CLset", ",", "igpdiag", ",", "row", ",", 
      "gset", ",", "iGp", ",", "Gp", ",", "iGn", ",", "Gn", ",", "igndiag", 
      ",", "gnset", ",", "aset", ",", "\[CapitalGamma]set", ",", "indexset", 
      ",", "leadrange"}], "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{
      RowBox[{"{", 
       RowBox[{
       "HLset", ",", "SLset", ",", "VLset", ",", "TLset", ",", "KLset", ",", 
        "CLset"}], "}"}], " ", "=", " ", "LeadSets"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"leadnum", "=", 
      RowBox[{"Length", "[", "HLset", "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"gset", "=", 
      RowBox[{
       RowBox[{
        RowBox[{"LeadGreenFunctions", "[", 
         RowBox[{
          RowBox[{"HLset", "[", 
           RowBox[{"[", "#", "]"}], "]"}], ",", 
          RowBox[{"SLset", "[", 
           RowBox[{"[", "#", "]"}], "]"}], ",", 
          RowBox[{"VLset", "[", 
           RowBox[{"[", "#", "]"}], "]"}], ",", 
          RowBox[{"TLset", "[", 
           RowBox[{"[", "#", "]"}], "]"}], ",", "e"}], "]"}], " ", "&"}], 
       "  ", "/@", " ", 
       RowBox[{"Table", "[", 
        RowBox[{"i", ",", 
         RowBox[{"{", 
          RowBox[{"i", ",", "1", ",", "leadnum"}], "}"}]}], "]"}]}]}], ";", 
     " ", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{
       "more", " ", "simple", " ", "just", " ", "with", " ", "table"}], 
       ".."}], "*)"}], "\[IndentingNewLine]", 
     RowBox[{"gpset", "=", 
      RowBox[{
       RowBox[{
        RowBox[{"#", "[", 
         RowBox[{"[", "1", "]"}], "]"}], " ", "&"}], " ", "/@", " ", 
       "gset"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"gnset", "=", 
      RowBox[{
       RowBox[{
        RowBox[{"#", "[", 
         RowBox[{"[", "2", "]"}], "]"}], " ", "&"}], " ", "/@", " ", 
       "gset"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"Print", "[", "gnset", "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"aset", "=", " ", 
      RowBox[{"gpset", "-", "gnset"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"\[CapitalGamma]set", "=", 
      RowBox[{
       RowBox[{
        RowBox[{"\[ImaginaryI]", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"e", " ", 
             RowBox[{"TLset", "[", 
              RowBox[{"[", "#", "]"}], "]"}]}], "-", 
            RowBox[{"VLset", "[", 
             RowBox[{"[", "#", "]"}], "]"}]}], ")"}], ".", 
          RowBox[{"aset", "[", 
           RowBox[{"[", "#", "]"}], "]"}], ".", 
          RowBox[{"ConjugateTranspose", "[", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"e", " ", 
              RowBox[{"TLset", "[", 
               RowBox[{"[", "#", "]"}], "]"}]}], "-", 
             RowBox[{"VLset", "[", 
              RowBox[{"[", "#", "]"}], "]"}]}], ")"}], "]"}]}]}], "&"}], "  ",
        "/@", " ", 
       RowBox[{"Table", "[", 
        RowBox[{"i", ",", 
         RowBox[{"{", 
          RowBox[{"i", ",", "1", ",", "leadnum"}], "}"}]}], "]"}]}]}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"igpdiag", "=", 
      RowBox[{"ArrayFlatten", "[", 
       RowBox[{"Array", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"If", "[", 
           RowBox[{
            RowBox[{"#1", "==", "#2"}], ",", 
            RowBox[{"Inverse", "[", 
             RowBox[{"gpset", "[", 
              RowBox[{"[", "#1", "]"}], "]"}], "]"}], ",", 
            RowBox[{"ConstantArray", "[", 
             RowBox[{"0", ",", 
              RowBox[{"{", 
               RowBox[{
                RowBox[{"Length", "[", 
                 RowBox[{"HLset", "[", 
                  RowBox[{"[", "#1", "]"}], "]"}], "]"}], ",", " ", 
                RowBox[{"Length", "[", 
                 RowBox[{"HLset", "[", 
                  RowBox[{"[", "#2", "]"}], "]"}], "]"}]}], "  ", "}"}]}], 
             "]"}]}], "]"}], "&"}], ",", 
         RowBox[{"{", 
          RowBox[{"leadnum", ",", "leadnum"}], "}"}]}], "]"}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"row", "=", 
      RowBox[{"Transpose", "[", 
       RowBox[{"ArrayFlatten", "[", 
        RowBox[{
         RowBox[{"Array", "[", 
          RowBox[{
           RowBox[{
            RowBox[{"Transpose", "[", 
             RowBox[{
              RowBox[{"e", " ", 
               RowBox[{"CLset", "[", 
                RowBox[{"[", "#", "]"}], "]"}]}], "-", 
              RowBox[{"KLset", "[", 
               RowBox[{"[", "#", "]"}], "]"}]}], "]"}], "&"}], ",", 
           RowBox[{"{", "leadnum", "}"}]}], "]"}], ",", "1"}], "]"}], "]"}]}],
      ";", "\[IndentingNewLine]", 
     RowBox[{"iGp", "=", 
      RowBox[{"ArrayFlatten", "[", " ", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
           RowBox[{
            RowBox[{"e", " ", "Ss"}], "-", "Hs"}], ",", "row"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"ConjugateTranspose", "[", "row", "]"}], ",", "igpdiag"}], 
          "}"}]}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"Gp", "=", 
      RowBox[{"Inverse", "[", "iGp", "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"igndiag", "=", 
      RowBox[{"ArrayFlatten", "[", 
       RowBox[{"Array", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"If", "[", 
           RowBox[{
            RowBox[{"#1", "==", "#2"}], ",", 
            RowBox[{"Inverse", "[", 
             RowBox[{"gnset", "[", 
              RowBox[{"[", "#1", "]"}], "]"}], "]"}], ",", 
            RowBox[{"ConstantArray", "[", 
             RowBox[{"0", ",", 
              RowBox[{"{", 
               RowBox[{
                RowBox[{"Length", "[", 
                 RowBox[{"HLset", "[", 
                  RowBox[{"[", "#1", "]"}], "]"}], "]"}], ",", " ", 
                RowBox[{"Length", "[", 
                 RowBox[{"HLset", "[", 
                  RowBox[{"[", "#2", "]"}], "]"}], "]"}]}], "  ", "}"}]}], 
             "]"}]}], "]"}], "&"}], ",", 
         RowBox[{"{", 
          RowBox[{"leadnum", ",", "leadnum"}], "}"}]}], "]"}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"iGn", "=", 
      RowBox[{"ArrayFlatten", "[", " ", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
           RowBox[{
            RowBox[{"e", " ", "Ss"}], "-", "Hs"}], ",", "row"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"ConjugateTranspose", "[", "row", "]"}], ",", "igndiag"}], 
          "}"}]}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"Gn", "=", 
      RowBox[{"Inverse", "[", "iGn", "]"}]}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"indexset", "=", 
      RowBox[{"Join", "[", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"Length", "[", "Hs", "]"}], "}"}], ",", 
        RowBox[{
         RowBox[{
          RowBox[{"Length", "[", "#", "]"}], "&"}], " ", "/@", " ", 
         "HLset"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"Print", "[", "indexset", "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"leadrange", "=", 
      RowBox[{"Transpose", "[", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{"Drop", "[", 
           RowBox[{
            RowBox[{"Accumulate", "[", "indexset", "]"}], ",", 
            RowBox[{"+", "1"}]}], "]"}], "-", "1"}], ",", 
         RowBox[{"Drop", "[", 
          RowBox[{
           RowBox[{"Accumulate", "[", "indexset", "]"}], ",", "1"}], "]"}]}], 
        "  ", "}"}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{"Gp", ",", "Gn", ",", "\[CapitalGamma]set", ",", "leadrange"}], 
      "}"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input",
 CellChangeTimes->{{3.4765211496995125`*^9, 3.4765211580189886`*^9}, {
   3.4765212638940444`*^9, 3.4765212713244696`*^9}, {3.476521413871623*^9, 
   3.4765215323604*^9}, {3.47652158446238*^9, 3.476521654451383*^9}, {
   3.4765219334033384`*^9, 3.4765219344043956`*^9}, {3.476522143445352*^9, 
   3.4765221474485807`*^9}, {3.476522200728628*^9, 3.4765222053118906`*^9}, {
   3.4765222715956817`*^9, 3.476522467783903*^9}, {3.476522500287762*^9, 
   3.476522648829258*^9}, {3.476522687583475*^9, 3.476522696270972*^9}, {
   3.4765227792867203`*^9, 3.476522887245895*^9}, {3.476523112018751*^9, 
   3.4765231530891004`*^9}, {3.4765232091323056`*^9, 3.476523212477497*^9}, {
   3.4765233077979493`*^9, 3.476523430987995*^9}, {3.476523467560087*^9, 
   3.476523578671442*^9}, {3.4765236219729185`*^9, 3.4765236224169445`*^9}, {
   3.476523737119505*^9, 3.4765237435008698`*^9}, {3.4765237851572523`*^9, 
   3.476524072123666*^9}, {3.4765241216955013`*^9, 3.476524220860173*^9}, {
   3.476524252840002*^9, 3.4765243489174976`*^9}, {3.4765244039456453`*^9, 
   3.4765244768168135`*^9}, {3.4765245085406275`*^9, 3.476524537172265*^9}, {
   3.4765245906923265`*^9, 3.476524686645815*^9}, {3.4765247180986137`*^9, 
   3.476524825676767*^9}, {3.4765253864188395`*^9, 3.4765253997186003`*^9}, {
   3.4765414606582727`*^9, 3.4765414996555033`*^9}, {3.4765415410368705`*^9, 
   3.47654154278697*^9}, 3.4766354585240602`*^9, 3.47663551306318*^9, {
   3.476638083444197*^9, 3.4766380887084985`*^9}, {3.4766381287657895`*^9, 
   3.4766382018459697`*^9}, {3.4766383941309676`*^9, 
   3.4766385062793818`*^9}, {3.4766385746332912`*^9, 3.476638581408679*^9}, {
   3.4766397204028263`*^9, 3.476639780632271*^9}, {3.476639957362379*^9, 
   3.476640093103143*^9}, {3.4766402360683203`*^9, 3.4766402624908314`*^9}, {
   3.4766403757453094`*^9, 3.4766404271882515`*^9}, {3.476641970150504*^9, 
   3.4766420838790092`*^9}, {3.476642712464962*^9, 3.476642880844593*^9}, 
   3.476642916616639*^9, {3.4766429940840697`*^9, 3.476643005560726*^9}, 
   3.4766430394176626`*^9, {3.476643077091818*^9, 3.4766431209473257`*^9}, {
   3.476643188693201*^9, 3.476643265154574*^9}, {3.476643827560742*^9, 
   3.476643831168948*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"TotalGreenFunction", "[", 
  RowBox[{"Hs", ",", "Ss", ",", 
   RowBox[{"Transpose", "[", "Leads", "]"}], ",", "1"}], "]"}]], "Input",
 CellChangeTimes->{{3.476522892003167*^9, 3.4765228977754974`*^9}, {
   3.4765229653393617`*^9, 3.476522974130864*^9}, {3.4765230606578135`*^9, 
   3.476523062533921*^9}, {3.476523164253739*^9, 3.476523166484866*^9}, {
   3.476523769529359*^9, 3.476523777735828*^9}, 3.4765238893222103`*^9, {
   3.476524074968829*^9, 3.4765241049865456`*^9}, {3.476524455405588*^9, 
   3.4765244678162985`*^9}, {3.476524852957327*^9, 3.47652485825963*^9}, {
   3.476642893101294*^9, 3.476642907077093*^9}, {3.476643324583973*^9, 
   3.476643332245412*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"1.0922878775646103`", "\[InvisibleSpace]", "-", 
        RowBox[{"1.6220798575968762`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"1.9768581920543467`", "\[InvisibleSpace]", "+", 
        RowBox[{"4.408454171090889`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "1.3293950279418778`"}], "-", 
        RowBox[{"2.109623159869105`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"8.614179603371358`", "\[InvisibleSpace]", "-", 
        RowBox[{"2.4992503138708706`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
    "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"1.0922878775646103`", "\[InvisibleSpace]", "-", 
        RowBox[{"1.6220798575968762`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"1.9768581920543467`", "\[InvisibleSpace]", "+", 
        RowBox[{"4.408454171090889`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "1.3293950279418778`"}], "-", 
        RowBox[{"2.109623159869105`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"8.614179603371358`", "\[InvisibleSpace]", "-", 
        RowBox[{"2.4992503138708706`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
    "}"}]}], "}"}]], "Print",
 CellChangeTimes->{{3.476642882278675*^9, 3.476642917931714*^9}, 
   3.476643010030982*^9, {3.4766430587817707`*^9, 3.4766431222854023`*^9}, {
   3.476643191625368*^9, 3.4766432282024603`*^9}, 3.476643335070573*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"2", ",", "2", ",", "2"}], "}"}]], "Print",
 CellChangeTimes->{{3.476642882278675*^9, 3.476642917931714*^9}, 
   3.476643010030982*^9, {3.4766430587817707`*^9, 3.4766431222854023`*^9}, {
   3.476643191625368*^9, 3.4766432282024603`*^9}, 3.4766433350745735`*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "0.20849459164712014`"}], "-", 
        RowBox[{"0.3347016558937303`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.20893412155958158`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.14616535665947883`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.6966921782440451`"}], "-", 
        RowBox[{"0.3297217585796804`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.12159596805550499`"}], "+", 
        RowBox[{"0.3757297948772781`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.6966921782440437`"}], "-", 
        RowBox[{"0.3297217585796808`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.12159596805550596`"}], "+", 
        RowBox[{"0.3757297948772776`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"0.6223289337411912`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.4564482451811098`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.266556869870959`"}], "-", 
        RowBox[{"0.3988913816664203`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.445467580064681`", "\[InvisibleSpace]", "+", 
        RowBox[{"0.903936042786633`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.03373278552153258`", "\[InvisibleSpace]", "-", 
        RowBox[{"1.7644200168639121`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.4454675800646814`", "\[InvisibleSpace]", "+", 
        RowBox[{"0.9039360427866318`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.033732785521532055`", "\[InvisibleSpace]", "-", 
        RowBox[{"1.764420016863912`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "0.8431504545410817`"}], "+", 
        RowBox[{"0.455323081838914`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.3911881743306582`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.7004202324694272`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.007586251114998388`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.9492414625439705`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.37339397121137874`", "\[InvisibleSpace]", "+", 
        RowBox[{"0.7712389396115054`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "2.4751192421662944`"}], "+", 
        RowBox[{"0.8936311623783397`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"1.755963424669738`", "\[InvisibleSpace]", "+", 
        RowBox[{"1.3601781363155414`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "0.18868692046612628`"}], "-", 
        RowBox[{"0.7891246070588867`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.2819590963388362`"}], "+", 
        RowBox[{"1.433704167118625`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.32002194985423194`"}], "+", 
        RowBox[{"0.8384907624887801`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.45532422557041174`"}], "-", 
        RowBox[{"0.9522967482900269`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"2.6554488491549844`", "\[InvisibleSpace]", "-", 
        RowBox[{"2.844133407808615`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "3.674683479961057`"}], "+", 
        RowBox[{"0.6902776283581562`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "0.8431504545410822`"}], "+", 
        RowBox[{"0.45532308183891335`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.39118817433065894`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.700420232469426`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "2.4751192421662944`"}], "+", 
        RowBox[{"0.8936311623783402`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"1.755963424669737`", "\[InvisibleSpace]", "+", 
        RowBox[{"1.3601781363155405`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.007586251114999193`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.9492414625439738`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.37339397121137646`", "\[InvisibleSpace]", "+", 
        RowBox[{"0.7712389396115082`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "0.18868692046612523`"}], "-", 
        RowBox[{"0.7891246070588871`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.2819590963388376`"}], "+", 
        RowBox[{"1.4337041671186244`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"2.6554488491549844`", "\[InvisibleSpace]", "-", 
        RowBox[{"2.8441334078086156`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "3.6746834799610566`"}], "+", 
        RowBox[{"0.6902776283581558`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.3200219498542305`"}], "+", 
        RowBox[{"0.8384907624887831`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.4553242255704115`"}], "-", 
        RowBox[{"0.9522967482900304`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
    "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"0.20222842993596984`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.07592877145321772`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.21573600709792606`"}], "+", 
        RowBox[{"0.37142694882329375`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.1072293324443451`"}], "+", 
        RowBox[{"0.0024713447415828094`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.43216996598586765`"}], "-", 
        RowBox[{"0.3775187510467015`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.10722933244434532`"}], "+", 
        RowBox[{"0.0024713447415830314`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.4321699659858681`"}], "-", 
        RowBox[{"0.3775187510467024`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "0.2408459734553297`"}], "-", 
        RowBox[{"0.19057159183170957`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.3460243843548825`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.10977120373785113`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.2638774506731773`"}], "+", 
        RowBox[{"0.19919122668856956`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.04268606972751665`"}], "-", 
        RowBox[{"0.4612988368808539`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.2638774506731773`"}], "+", 
        RowBox[{"0.19919122668856937`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.04268606972751644`"}], "-", 
        RowBox[{"0.46129883688085355`", " ", "\[ImaginaryI]"}]}]}], "}"}], 
     ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "0.26403678701701705`"}], "-", 
        RowBox[{"0.18116678632886374`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.047579306547414324`"}], "-", 
        RowBox[{"0.012301610085112102`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.49428753722613517`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.9971374962023124`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.8557972770491943`", "\[InvisibleSpace]", "+", 
        RowBox[{"2.367877208611645`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.5980003403384757`"}], "+", 
        RowBox[{"0.6249423613945639`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "1.1210609150051525`"}], "-", 
        RowBox[{"2.040576962479246`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "0.12982857466913567`"}], "+", 
        RowBox[{"0.40262871740410544`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.40691276279648614`"}], "+", 
        RowBox[{"0.48138680996677635`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.4674833630756363`"}], "-", 
        RowBox[{"0.876717595216852`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"4.147805965642188`", "\[InvisibleSpace]", "-", 
        RowBox[{"1.552675059996613`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.8619116648662423`", "\[InvisibleSpace]", "+", 
        RowBox[{"1.2329055646522544`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "4.4663736377291725`"}], "+", 
        RowBox[{"0.9465752538742573`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "0.2640367870170172`"}], "-", 
        RowBox[{"0.18116678632886418`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.047579306547414546`"}], "-", 
        RowBox[{"0.012301610085112075`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.5980003403384757`"}], "+", 
        RowBox[{"0.624942361394564`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "1.1210609150051525`"}], "-", 
        RowBox[{"2.0405769624792462`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.4942875372261354`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.9971374962023125`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.8557972770491938`", "\[InvisibleSpace]", "+", 
        RowBox[{"2.3678772086116444`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "0.12982857466913567`"}], "+", 
        RowBox[{"0.40262871740410555`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.4069127627964862`"}], "+", 
        RowBox[{"0.48138680996677674`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"0.8619116648662423`", "\[InvisibleSpace]", "+", 
        RowBox[{"1.2329055646522542`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "4.4663736377291725`"}], "+", 
        RowBox[{"0.9465752538742573`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{
        RowBox[{"-", "0.4674833630756362`"}], "-", 
        RowBox[{"0.8767175952168522`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"4.147805965642188`", "\[InvisibleSpace]", "-", 
        RowBox[{"1.5526750599966126`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
    "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"0.39301112583927855`", "\[InvisibleSpace]", "+", 
          RowBox[{"2.474943355975685`", " ", "\[ImaginaryI]"}]}], ",", 
         RowBox[{"2.8604475277258965`", "\[InvisibleSpace]", "+", 
          RowBox[{"2.0346580312020435`", " ", "\[ImaginaryI]"}]}]}], "}"}], 
       ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{"-", "2.0894391842254807`"}], "+", 
          RowBox[{"2.8206802828805975`", " ", "\[ImaginaryI]"}]}], ",", 
         RowBox[{"0.21416898430567144`", "\[InvisibleSpace]", "+", 
          RowBox[{"1.3487050872451785`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
      "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"0.39301112583927855`", "\[InvisibleSpace]", "+", 
          RowBox[{"2.474943355975685`", " ", "\[ImaginaryI]"}]}], ",", 
         RowBox[{"2.8604475277258965`", "\[InvisibleSpace]", "+", 
          RowBox[{"2.0346580312020435`", " ", "\[ImaginaryI]"}]}]}], "}"}], 
       ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{"-", "2.0894391842254807`"}], "+", 
          RowBox[{"2.8206802828805975`", " ", "\[ImaginaryI]"}]}], ",", 
         RowBox[{"0.21416898430567144`", "\[InvisibleSpace]", "+", 
          RowBox[{"1.3487050872451785`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
      "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"3", ",", "4"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"5", ",", "6"}], "}"}]}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{{3.4766428595083723`*^9, 3.476642917967716*^9}, 
   3.47664301017099*^9, {3.476643058848774*^9, 3.476643122350406*^9}, {
   3.4766431917503757`*^9, 3.4766432282694645`*^9}, 3.4766433350805736`*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"Transmission", "[", 
   RowBox[{
   "Hs_", ",", "Ss_", ",", "LeadSets_", ",", "p_", ",", "q_", ",", "e_"}], 
   "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "Gp", ",", "Gn", ",", "\[CapitalGamma]set", ",", "lr", ",", "GRpq", ",", 
      "GAqp"}], "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{
      RowBox[{"{", 
       RowBox[{"Gp", ",", "Gn", ",", "\[CapitalGamma]set", ",", "lr"}], "}"}],
       "=", 
      RowBox[{"TotalGreenFunction", "[", 
       RowBox[{"Hs", ",", "Ss", ",", "LeadSets", ",", "1"}], "]"}]}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"GRpq", "=", 
      RowBox[{"Gp", "[", 
       RowBox[{"[", 
        RowBox[{
         RowBox[{
          RowBox[{"lr", "[", 
           RowBox[{"[", 
            RowBox[{"p", ",", "1"}], "]"}], "]"}], ";;", 
          RowBox[{"lr", "[", 
           RowBox[{"[", 
            RowBox[{"p", ",", "2"}], "]"}], "]"}]}], " ", ",", " ", 
         RowBox[{
          RowBox[{"lr", "[", 
           RowBox[{"[", 
            RowBox[{"q", ",", "1"}], "]"}], "]"}], ";;", 
          RowBox[{"lr", "[", 
           RowBox[{"[", 
            RowBox[{"q", ",", "2"}], "]"}], "]"}]}]}], "  ", "]"}], "]"}]}], 
     ";", "\[IndentingNewLine]", 
     RowBox[{"GAqp", "=", 
      RowBox[{"Gn", "[", 
       RowBox[{"[", 
        RowBox[{
         RowBox[{
          RowBox[{"lr", "[", 
           RowBox[{"[", 
            RowBox[{"q", ",", "1"}], "]"}], "]"}], ";;", 
          RowBox[{"lr", "[", 
           RowBox[{"[", 
            RowBox[{"q", ",", "2"}], "]"}], "]"}]}], " ", ",", " ", 
         RowBox[{
          RowBox[{"lr", "[", 
           RowBox[{"[", 
            RowBox[{"p", ",", "1"}], "]"}], "]"}], ";;", 
          RowBox[{"lr", "[", 
           RowBox[{"[", 
            RowBox[{"p", ",", "2"}], "]"}], "]"}]}]}], "  ", "]"}], "]"}]}], 
     ";", "\[IndentingNewLine]", 
     RowBox[{"Tr", "[", 
      RowBox[{
       RowBox[{"\[CapitalGamma]set", "[", 
        RowBox[{"[", "p", "]"}], "]"}], ".", "GRpq", ".", 
       RowBox[{"\[CapitalGamma]set", "[", 
        RowBox[{"[", "q", "]"}], "]"}], ".", "GAqp"}], "]"}]}]}], 
   "\[IndentingNewLine]", "]"}]}]], "Input",
 CellChangeTimes->{{3.4766433425390005`*^9, 3.476643552594015*^9}, {
   3.476643585970924*^9, 3.4766437404687605`*^9}, 3.4766437766278286`*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Transmission", "[", 
  RowBox[{"Hs", ",", "Ss", ",", 
   RowBox[{"Transpose", "[", "Leads", "]"}], ",", "1", ",", "2", ",", "1"}], 
  "]"}]], "Input",
 CellChangeTimes->{{3.476643745890071*^9, 3.476643764183117*^9}, 
   3.4766437961009426`*^9, 3.476643849101974*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"1.0922878775646105`", "\[InvisibleSpace]", "-", 
        RowBox[{"1.6220798575968762`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"1.976858192054347`", "\[InvisibleSpace]", "+", 
        RowBox[{"4.40845417109089`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "1.3293950279418771`"}], "-", 
        RowBox[{"2.1096231598691055`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"8.614179603371358`", "\[InvisibleSpace]", "-", 
        RowBox[{"2.499250313870868`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
    "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"1.0922878775646105`", "\[InvisibleSpace]", "-", 
        RowBox[{"1.6220798575968762`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"1.976858192054347`", "\[InvisibleSpace]", "+", 
        RowBox[{"4.40845417109089`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "1.3293950279418771`"}], "-", 
        RowBox[{"2.1096231598691055`", " ", "\[ImaginaryI]"}]}], ",", 
       RowBox[{"8.614179603371358`", "\[InvisibleSpace]", "-", 
        RowBox[{"2.499250313870868`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
    "}"}]}], "}"}]], "Print",
 CellChangeTimes->{{3.4766437647851515`*^9, 3.4766438003031826`*^9}, {
  3.4766438447837267`*^9, 3.4766438502350388`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"2", ",", "2", ",", "2"}], "}"}]], "Print",
 CellChangeTimes->{{3.4766437647851515`*^9, 3.4766438003031826`*^9}, {
  3.4766438447837267`*^9, 3.4766438502390394`*^9}}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"-", "152.64350149971975`"}], "+", 
  RowBox[{"97.64389280960586`", " ", "\[ImaginaryI]"}]}]], "Output",
 CellChangeTimes->{{3.476643764968162*^9, 3.476643800342185*^9}, {
  3.4766438448337297`*^9, 3.476643850243039*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 TagBox[
  RowBox[{"ja", "=", 
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {
       RowBox[{
        RowBox[{"-", "0.21`"}], "-", 
        RowBox[{"0.33`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"0.21`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.15`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{
        RowBox[{"-", "0.7000000000000001`"}], "-", 
        RowBox[{"0.33`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{
        RowBox[{"-", "0.12`"}], "+", 
        RowBox[{"0.38`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{
        RowBox[{"-", "0.7000000000000001`"}], "-", 
        RowBox[{"0.33`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{
        RowBox[{"-", "0.12`"}], "+", 
        RowBox[{"0.38`", " ", "\[ImaginaryI]"}]}]},
      {
       RowBox[{"0.62`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.46`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{
        RowBox[{"-", "0.27`"}], "-", 
        RowBox[{"0.4`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"0.45`", "\[InvisibleSpace]", "+", 
        RowBox[{"0.9`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"0.03`", "\[InvisibleSpace]", "-", 
        RowBox[{"1.76`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"0.45`", "\[InvisibleSpace]", "+", 
        RowBox[{"0.9`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"0.03`", "\[InvisibleSpace]", "-", 
        RowBox[{"1.76`", " ", "\[ImaginaryI]"}]}]},
      {
       RowBox[{
        RowBox[{"-", "0.84`"}], "+", 
        RowBox[{"0.46`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"0.39`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.7000000000000001`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"0.01`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.9500000000000001`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"0.37`", "\[InvisibleSpace]", "+", 
        RowBox[{"0.77`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{
        RowBox[{"-", "2.48`"}], "+", 
        RowBox[{"0.89`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"1.76`", "\[InvisibleSpace]", "+", 
        RowBox[{"1.36`", " ", "\[ImaginaryI]"}]}]},
      {
       RowBox[{
        RowBox[{"-", "0.19`"}], "-", 
        RowBox[{"0.79`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{
        RowBox[{"-", "0.28`"}], "+", 
        RowBox[{"1.43`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{
        RowBox[{"-", "0.32`"}], "+", 
        RowBox[{"0.84`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{
        RowBox[{"-", "0.46`"}], "-", 
        RowBox[{"0.9500000000000001`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"2.66`", "\[InvisibleSpace]", "-", 
        RowBox[{"2.84`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{
        RowBox[{"-", "3.67`"}], "+", 
        RowBox[{"0.6900000000000001`", " ", "\[ImaginaryI]"}]}]},
      {
       RowBox[{
        RowBox[{"-", "0.84`"}], "+", 
        RowBox[{"0.46`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"0.39`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.7000000000000001`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{
        RowBox[{"-", "2.48`"}], "+", 
        RowBox[{"0.89`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"1.76`", "\[InvisibleSpace]", "+", 
        RowBox[{"1.36`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"0.01`", "\[InvisibleSpace]", "-", 
        RowBox[{"0.9500000000000001`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"0.37`", "\[InvisibleSpace]", "+", 
        RowBox[{"0.77`", " ", "\[ImaginaryI]"}]}]},
      {
       RowBox[{
        RowBox[{"-", "0.19`"}], "-", 
        RowBox[{"0.79`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{
        RowBox[{"-", "0.28`"}], "+", 
        RowBox[{"1.43`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{"2.66`", "\[InvisibleSpace]", "-", 
        RowBox[{"2.84`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{
        RowBox[{"-", "3.67`"}], "+", 
        RowBox[{"0.6900000000000001`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{
        RowBox[{"-", "0.32`"}], "+", 
        RowBox[{"0.84`", " ", "\[ImaginaryI]"}]}], 
       RowBox[{
        RowBox[{"-", "0.46`"}], "-", 
        RowBox[{"0.9500000000000001`", " ", "\[ImaginaryI]"}]}]}
     },
     GridBoxAlignment->{
      "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}},
        "RowsIndexed" -> {}},
     GridBoxSpacings->{"Columns" -> {
         Offset[0.27999999999999997`], {
          Offset[0.7]}, 
         Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
         Offset[0.2], {
          Offset[0.4]}, 
         Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Input",
 CellChangeTimes->{{3.4766421351269407`*^9, 3.4766421356519704`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "0.21`"}], "-", 
      RowBox[{"0.33`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"0.21`", "\[InvisibleSpace]", "-", 
      RowBox[{"0.15`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "0.7000000000000001`"}], "-", 
      RowBox[{"0.33`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "0.12`"}], "+", 
      RowBox[{"0.38`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "0.7000000000000001`"}], "-", 
      RowBox[{"0.33`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "0.12`"}], "+", 
      RowBox[{"0.38`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"0.62`", "\[InvisibleSpace]", "-", 
      RowBox[{"0.46`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "0.27`"}], "-", 
      RowBox[{"0.4`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"0.45`", "\[InvisibleSpace]", "+", 
      RowBox[{"0.9`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"0.03`", "\[InvisibleSpace]", "-", 
      RowBox[{"1.76`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"0.45`", "\[InvisibleSpace]", "+", 
      RowBox[{"0.9`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"0.03`", "\[InvisibleSpace]", "-", 
      RowBox[{"1.76`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "0.84`"}], "+", 
      RowBox[{"0.46`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"0.39`", "\[InvisibleSpace]", "-", 
      RowBox[{"0.7000000000000001`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"0.01`", "\[InvisibleSpace]", "-", 
      RowBox[{"0.9500000000000001`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"0.37`", "\[InvisibleSpace]", "+", 
      RowBox[{"0.77`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "2.48`"}], "+", 
      RowBox[{"0.89`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"1.76`", "\[InvisibleSpace]", "+", 
      RowBox[{"1.36`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "0.19`"}], "-", 
      RowBox[{"0.79`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "0.28`"}], "+", 
      RowBox[{"1.43`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "0.32`"}], "+", 
      RowBox[{"0.84`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "0.46`"}], "-", 
      RowBox[{"0.9500000000000001`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"2.66`", "\[InvisibleSpace]", "-", 
      RowBox[{"2.84`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "3.67`"}], "+", 
      RowBox[{"0.6900000000000001`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "0.84`"}], "+", 
      RowBox[{"0.46`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"0.39`", "\[InvisibleSpace]", "-", 
      RowBox[{"0.7000000000000001`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "2.48`"}], "+", 
      RowBox[{"0.89`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"1.76`", "\[InvisibleSpace]", "+", 
      RowBox[{"1.36`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"0.01`", "\[InvisibleSpace]", "-", 
      RowBox[{"0.9500000000000001`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"0.37`", "\[InvisibleSpace]", "+", 
      RowBox[{"0.77`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "0.19`"}], "-", 
      RowBox[{"0.79`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "0.28`"}], "+", 
      RowBox[{"1.43`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{"2.66`", "\[InvisibleSpace]", "-", 
      RowBox[{"2.84`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "3.67`"}], "+", 
      RowBox[{"0.6900000000000001`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "0.32`"}], "+", 
      RowBox[{"0.84`", " ", "\[ImaginaryI]"}]}], ",", 
     RowBox[{
      RowBox[{"-", "0.46`"}], "-", 
      RowBox[{"0.9500000000000001`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], 
  "}"}]], "Output",
 CellChangeTimes->{3.476642136116997*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Print out Extended Hamiltonian", "Subsubsection",
 CellChangeTimes->{{3.476521941184783*^9, 3.476521970090437*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"Round", "[", 
   RowBox[{
    RowBox[{"N", "[", "Hsx", "]"}], ",", "0.01"}], "]"}], " ", "//", " ", 
  "MatrixForm"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Round", "[", 
   RowBox[{
    RowBox[{"N", "[", "Ssx", "]"}], ",", "0.01"}], "]"}], " ", "//", " ", 
  "MatrixForm"}]}], "Input"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {"0", "1.`", "1.`", "0.5`", "1.`", "0.5`"},
     {"1.`", "0", "0", 
      RowBox[{"0.5`", " ", "\[ImaginaryI]"}], "0", 
      RowBox[{"0.5`", " ", "\[ImaginaryI]"}]},
     {"1.`", "0", "0", "1.`", "0", "0"},
     {"0.5`", 
      RowBox[{
       RowBox[{"-", "0.5`"}], " ", "\[ImaginaryI]"}], "1.`", "0", "0", "0"},
     {"1.`", "0", "0", "0", "0", "1.`"},
     {"0.5`", 
      RowBox[{
       RowBox[{"-", "0.5`"}], " ", "\[ImaginaryI]"}], "0", "0", "1.`", "0"}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{
  3.476521514912402*^9, {3.4765216065596437`*^9, 3.476521654977413*^9}, 
   3.476605003550398*^9, 3.4766050879112225`*^9, {3.4766052739668646`*^9, 
   3.476605288200679*^9}, 3.476605321724596*^9, {3.476605363153966*^9, 
   3.4766054060594196`*^9}, 3.4766312769038854`*^9}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {"1.`", "0.2`", "0.1`", "0", "0.1`", "0"},
     {"0.2`", "1.`", "0", "0", "0", "0"},
     {"0.1`", "0", "1.`", "0.2`", "0", "0"},
     {"0", "0", "0.2`", "1.`", "0", "0"},
     {"0.1`", "0", "0", "0", "1.`", "0.2`"},
     {"0", "0", "0", "0", "0.2`", "1.`"}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{
  3.476521514912402*^9, {3.4765216065596437`*^9, 3.476521654977413*^9}, 
   3.476605003550398*^9, 3.4766050879112225`*^9, {3.4766052739668646`*^9, 
   3.476605288200679*^9}, 3.476605321724596*^9, {3.476605363153966*^9, 
   3.4766054060594196`*^9}, 3.476631276908886*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"range", "=", 
  RowBox[{"Transpose", "[", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{
      RowBox[{"Drop", "[", 
       RowBox[{
        RowBox[{"Accumulate", "[", 
         RowBox[{"{", 
          RowBox[{"2", ",", "2", ",", "2", ",", "3"}], "}"}], "]"}], ",", 
        RowBox[{"+", "1"}]}], "]"}], "-", "1"}], ",", 
     RowBox[{"Drop", "[", 
      RowBox[{
       RowBox[{"Accumulate", "[", 
        RowBox[{"{", 
         RowBox[{"2", ",", "2", ",", "2", ",", "3"}], "}"}], "]"}], ",", 
       "1"}], "]"}]}], "  ", "}"}], "]"}]}]], "Input",
 CellChangeTimes->{{3.4766421020820503`*^9, 3.4766421139267273`*^9}, {
  3.4766422502245235`*^9, 3.4766422641253185`*^9}, {3.476642316363306*^9, 
  3.476642357040633*^9}, {3.4766423928186793`*^9, 3.476642431535894*^9}, {
  3.4766424835288677`*^9, 3.4766424941704764`*^9}, {3.4766425458524323`*^9, 
  3.4766425848136606`*^9}, {3.476642626083021*^9, 3.4766426993102093`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"3", ",", "4"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"5", ",", "6"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"8", ",", "9"}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.4766424222653637`*^9, {3.4766424895572124`*^9, 3.4766424951315317`*^9}, {
   3.4766425654505534`*^9, 3.476642585379693*^9}, {3.476642636601623*^9, 
   3.4766427001962605`*^9}}]
}, Open  ]],

Cell[BoxData[""], "Input",
 CellChangeTimes->{{3.476642636578622*^9, 3.476642640700857*^9}}],

Cell[CellGroupData[{

Cell[BoxData[""], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"4", ",", "6", ",", "9"}], "}"}]], "Output",
 CellChangeTimes->{
  3.476642114401755*^9, 3.4766422525316553`*^9, {3.4766423541994705`*^9, 
   3.47664235751266*^9}, {3.4766424022252173`*^9, 3.4766424149209433`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"Part", "::", "\<\"span\"\>"}], 
  RowBox[{
  ":", " "}], "\<\"\[NoBreak]\\!\\(\\*StyleBox[\\!\\(1 ;; \
\\(\\(\\(\\(-1\\)\\) + Length\\)\\)\\), \
\\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\" is not a valid Span \
specification. A Span specification should be 1, 2, or 3 integers separated \
by ;;. (Any of the integers can be omitted, or replaced with \
All.)\\\\\\\"\\\", \\\"MT\\\"]\\) \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/Part\\\", ButtonNote -> \
\\\"Part::span\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{3.476642415069952*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"{", 
   RowBox[{"2", ",", "4", ",", "6", ",", "9"}], "}"}], "\[LeftDoubleBracket]", 
  RowBox[{"1", ";;", 
   RowBox[{
    RowBox[{"-", "1"}], "+", "Length"}]}], 
  "\[RightDoubleBracket]"}]], "Output",
 CellChangeTimes->{
  3.476642114401755*^9, 3.4766422525316553`*^9, {3.4766423541994705`*^9, 
   3.47664235751266*^9}, {3.4766424022252173`*^9, 3.4766424150739527`*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"ja", "[", 
   RowBox[{"[", 
    RowBox[{
     RowBox[{"1", ";;", "2"}], ",", 
     RowBox[{"1", ";;", "2"}]}], "]"}], "]"}], " ", "//", " ", 
  "MatrixForm"}]], "Input",
 CellChangeTimes->{{3.47664214228835*^9, 3.476642213635431*^9}}],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "0.21`"}], "-", 
       RowBox[{"0.33`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{"0.21`", "\[InvisibleSpace]", "-", 
       RowBox[{"0.15`", " ", "\[ImaginaryI]"}]}]},
     {
      RowBox[{"0.62`", "\[InvisibleSpace]", "-", 
       RowBox[{"0.46`", " ", "\[ImaginaryI]"}]}], 
      RowBox[{
       RowBox[{"-", "0.27`"}], "-", 
       RowBox[{"0.4`", " ", "\[ImaginaryI]"}]}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.47664215592913*^9, 3.476642214282468*^9}}]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]]
},
WindowSize->{1202, 705},
WindowMargins->{{-4, Automatic}, {Automatic, 0}},
Magnification->1.0000001192092896`,
FrontEndVersion->"7.0 for Microsoft Windows (64-bit) (February 18, 2009)",
StyleDefinitions->Notebook[{
   Cell[
    StyleData[
    StyleDefinitions -> 
     FrontEnd`FileName[{"Report", ""}, "StandardReport.nb", CharacterEncoding -> 
       "WindowsANSI"]]]}, Visible -> False, FrontEndVersion -> 
  "7.0 for Microsoft Windows (64-bit) (February 18, 2009)", StyleDefinitions -> 
  "PrivateStylesheetFormatting.nb"]
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[567, 22, 234, 3, 81, "Title"],
Cell[804, 27, 273, 5, 29, "Text"],
Cell[CellGroupData[{
Cell[1102, 36, 137, 2, 73, "Section"],
Cell[CellGroupData[{
Cell[1264, 42, 771, 17, 121, "Input"],
Cell[2038, 61, 625, 12, 21, "Message"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[2712, 79, 186, 3, 73, "Section"],
Cell[CellGroupData[{
Cell[2923, 86, 95, 1, 24, "Subsection"],
Cell[CellGroupData[{
Cell[3043, 91, 179, 2, 17, "Subsubsection"],
Cell[3225, 95, 779, 18, 60, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[4041, 118, 176, 2, 16, "Subsubsection"],
Cell[4220, 122, 749, 19, 60, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[5006, 146, 107, 1, 16, "Subsubsection"],
Cell[5116, 149, 302, 8, 68, "Input"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[5467, 163, 101, 1, 24, "Subsection"],
Cell[CellGroupData[{
Cell[5593, 168, 130, 1, 17, "Subsubsection"],
Cell[5726, 171, 875, 27, 45, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[6638, 203, 107, 1, 16, "Subsubsection"],
Cell[6748, 206, 353, 10, 30, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[7138, 221, 99, 1, 16, "Subsubsection"],
Cell[CellGroupData[{
Cell[7262, 226, 1026, 24, 30, "Input"],
Cell[8291, 252, 4965, 83, 87, "Output"]
}, Open  ]]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[13317, 342, 105, 1, 24, "Subsection"],
Cell[CellGroupData[{
Cell[13447, 347, 117, 1, 23, "Subsubsection"],
Cell[13567, 350, 697, 21, 74, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[14301, 376, 111, 1, 23, "Subsubsection"],
Cell[14415, 379, 1327, 40, 111, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[15779, 424, 126, 1, 23, "Subsubsection"],
Cell[15908, 427, 1225, 26, 61, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[17170, 458, 174, 3, 23, "Subsubsection"],
Cell[17347, 463, 927, 26, 74, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[18311, 494, 189, 4, 23, "Subsubsection"],
Cell[CellGroupData[{
Cell[18525, 502, 1077, 28, 40, "Input"],
Cell[19605, 532, 1814, 34, 234, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[21468, 572, 173, 2, 23, "Subsubsection"],
Cell[CellGroupData[{
Cell[21666, 578, 1456, 37, 141, "Input"],
Cell[23125, 617, 2133, 47, 68, "Output"],
Cell[25261, 666, 1788, 38, 97, "Output"],
Cell[27052, 706, 1468, 32, 97, "Output"],
Cell[28523, 740, 1396, 29, 97, "Output"],
Cell[29922, 771, 1397, 29, 97, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[31368, 806, 175, 3, 23, "Subsubsection"],
Cell[CellGroupData[{
Cell[31568, 813, 1300, 37, 302, "Input"],
Cell[32871, 852, 1817, 37, 87, "Output"]
}, Open  ]]
}, Closed]]
}, Open  ]],
Cell[CellGroupData[{
Cell[34749, 896, 135, 1, 24, "Subsection"],
Cell[CellGroupData[{
Cell[34909, 901, 123, 1, 23, "Subsubsection"],
Cell[35035, 904, 2161, 64, 81, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[37233, 973, 123, 1, 23, "Subsubsection"],
Cell[CellGroupData[{
Cell[37381, 978, 279, 7, 40, "Input"],
Cell[37663, 987, 1303, 32, 97, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[39015, 1025, 117, 1, 23, "Subsubsection"],
Cell[39135, 1028, 1096, 31, 61, "Input"],
Cell[CellGroupData[{
Cell[40256, 1063, 364, 7, 61, "Input"],
Cell[40623, 1072, 579, 10, 39, "Output"],
Cell[41205, 1084, 579, 10, 39, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[41833, 1100, 315, 8, 88, "Subsubsection"],
Cell[42151, 1110, 5361, 152, 381, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[47549, 1267, 118, 1, 23, "Subsubsection"],
Cell[CellGroupData[{
Cell[47692, 1272, 1724, 47, 241, "Input"],
Cell[49419, 1321, 1212, 27, 55, "Output"],
Cell[50634, 1350, 1324, 31, 68, "Output"],
Cell[51961, 1383, 1331, 30, 68, "Output"],
Cell[53295, 1415, 1530, 35, 68, "Output"],
Cell[54828, 1452, 1208, 26, 55, "Output"],
Cell[56039, 1480, 1334, 30, 68, "Output"],
Cell[57376, 1512, 1344, 29, 68, "Output"],
Cell[58723, 1543, 1544, 35, 68, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[60316, 1584, 116, 1, 23, "Subsubsection"],
Cell[60435, 1587, 467, 11, 61, "Input"],
Cell[CellGroupData[{
Cell[60927, 1602, 215, 4, 40, "Input"],
Cell[61145, 1608, 1483, 35, 68, "Output"]
}, Open  ]],
Cell[62643, 1646, 554, 16, 40, "Input"],
Cell[CellGroupData[{
Cell[63222, 1666, 206, 5, 40, "Input"],
Cell[63431, 1673, 1484, 33, 68, "Output"]
}, Open  ]],
Cell[64930, 1709, 1218, 33, 61, "Input"],
Cell[CellGroupData[{
Cell[66173, 1746, 496, 9, 61, "Input"],
Cell[66672, 1757, 1679, 35, 68, "Output"],
Cell[68354, 1794, 1676, 36, 68, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[70067, 1835, 632, 14, 40, "Input"],
Cell[70702, 1851, 1206, 26, 39, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[71957, 1883, 103, 1, 23, "Subsubsection"],
Cell[CellGroupData[{
Cell[72085, 1888, 455, 10, 40, "Input"],
Cell[72543, 1900, 1175, 29, 73, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[73755, 1934, 1211, 29, 75, "Input"],
Cell[74969, 1965, 761, 20, 42, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[75767, 1990, 540, 13, 40, "Input"],
Cell[76310, 2005, 1649, 35, 73, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[77996, 2045, 395, 10, 40, "Input"],
Cell[78394, 2057, 1000, 21, 39, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[79431, 2083, 1559, 37, 121, "Input"],
Cell[80993, 2122, 482, 11, 39, "Output"],
Cell[CellGroupData[{
Cell[81500, 2137, 1342, 34, 36, "Print"],
Cell[82845, 2173, 1368, 34, 36, "Print"],
Cell[84216, 2209, 1398, 34, 36, "Print"],
Cell[85617, 2245, 1423, 34, 41, "Print"]
}, Open  ]],
Cell[87055, 2282, 1419, 34, 73, "Output"],
Cell[88477, 2318, 1419, 34, 73, "Output"]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[89969, 2360, 106, 1, 73, "Section"],
Cell[90078, 2363, 12256, 313, 981, "Input"],
Cell[CellGroupData[{
Cell[102359, 2680, 717, 14, 81, "Input"],
Cell[103079, 2696, 1677, 36, 68, "Output"],
Cell[104759, 2734, 1673, 36, 68, "Output"]
}, Open  ]]
}, Open  ]],
Cell[106459, 2774, 98, 1, 73, "Section"],
Cell[CellGroupData[{
Cell[106582, 2779, 108, 1, 43, "Section"],
Cell[CellGroupData[{
Cell[106715, 2784, 95, 1, 24, "Subsection"],
Cell[CellGroupData[{
Cell[106835, 2789, 102, 1, 23, "Subsubsection"],
Cell[106940, 2792, 337, 4, 29, "Text"],
Cell[107280, 2798, 383, 12, 51, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[107700, 2815, 101, 1, 23, "Subsubsection"],
Cell[107804, 2818, 271, 3, 29, "Text"],
Cell[108078, 2823, 831, 18, 51, "Input"],
Cell[108912, 2843, 230, 3, 29, "Text"],
Cell[109145, 2848, 803, 20, 52, "Input"],
Cell[109951, 2870, 124, 1, 29, "Text"],
Cell[110078, 2873, 473, 15, 52, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[110588, 2893, 101, 1, 23, "Subsubsection"],
Cell[110692, 2896, 271, 3, 29, "Text"],
Cell[110966, 2901, 882, 19, 51, "Input"],
Cell[111851, 2922, 200, 2, 29, "Text"],
Cell[112054, 2926, 853, 20, 52, "Input"],
Cell[112910, 2948, 124, 1, 29, "Text"],
Cell[113037, 2951, 475, 15, 52, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[113549, 2971, 108, 1, 23, "Subsubsection"],
Cell[113660, 2974, 477, 14, 40, "Input"]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[114186, 2994, 173, 2, 24, "Subsection"],
Cell[CellGroupData[{
Cell[114384, 3000, 186, 2, 23, "Subsubsection"],
Cell[114573, 3004, 1267, 34, 111, "Input"]
}, Closed]],
Cell[CellGroupData[{
Cell[115877, 3043, 121, 1, 23, "Subsubsection"],
Cell[CellGroupData[{
Cell[116023, 3048, 329, 10, 68, "Input"],
Cell[116355, 3060, 1306, 32, 87, "Output"],
Cell[117664, 3094, 1102, 26, 87, "Output"]
}, Open  ]]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[118827, 3127, 211, 3, 24, "Subsection"],
Cell[CellGroupData[{
Cell[119063, 3134, 186, 2, 23, "Subsubsection"],
Cell[119252, 3138, 10251, 240, 581, "Input"],
Cell[CellGroupData[{
Cell[129528, 3382, 698, 11, 40, "Input"],
Cell[CellGroupData[{
Cell[130251, 3397, 1616, 37, 43, "Print"],
Cell[131870, 3436, 300, 5, 23, "Print"]
}, Open  ]],
Cell[132185, 3444, 12490, 268, 287, "Output"]
}, Open  ]],
Cell[144690, 3715, 2399, 66, 161, "Input"],
Cell[CellGroupData[{
Cell[147114, 3785, 290, 6, 40, "Input"],
Cell[CellGroupData[{
Cell[147429, 3795, 1519, 36, 43, "Print"],
Cell[148951, 3833, 205, 4, 23, "Print"]
}, Open  ]],
Cell[149171, 3840, 255, 5, 39, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[149463, 3850, 4609, 115, 117, InheritFromParent],
Cell[154075, 3967, 4233, 108, 135, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[158357, 4081, 121, 1, 23, "Subsubsection"],
Cell[CellGroupData[{
Cell[158503, 4086, 329, 10, 61, "Input"],
Cell[158835, 4098, 1312, 32, 127, "Output"],
Cell[160150, 4132, 1106, 26, 127, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[161293, 4163, 945, 22, 40, "Input"],
Cell[162241, 4187, 431, 12, 39, "Output"]
}, Open  ]],
Cell[162687, 4202, 92, 1, 40, "Input"],
Cell[CellGroupData[{
Cell[162804, 4207, 26, 0, 40, "Input"],
Cell[162833, 4209, 253, 5, 39, "Output"],
Cell[163089, 4216, 671, 13, 21, "Message"],
Cell[163763, 4231, 407, 10, 39, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[164207, 4246, 269, 8, 40, "Input"],
Cell[164479, 4256, 1037, 28, 68, "Output"]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
